Introduce libc independent assert fail handler
Introduce assert_fail_handler function definition as a libc independent
interface for handling assert failures.
Signed-off-by: Imre Kis <imre.kis@arm.com>
Change-Id: I80207b0158e44e697c8a0b8366c56dfbdc9b7c37
diff --git a/components/common/libc/include/assert_fail_handler.h b/components/common/libc/include/assert_fail_handler.h
new file mode 100644
index 0000000..7f36f25
--- /dev/null
+++ b/components/common/libc/include/assert_fail_handler.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: BSD-3-Clause */
+/*
+ * Copyright (c) 2021-2022, Arm Limited and Contributors. All rights reserved.
+ */
+
+#ifndef ASSERT_FAIL_HANDLER_H_
+#define ASSERT_FAIL_HANDLER_H_
+
+#include "compiler.h"
+
+/*
+ * Generic assert fail handler function definition. Should be implemented by the environment.
+ */
+void __noreturn assert_fail_handler(const char *file, int line,
+ const char *func, const char *failedexpr);
+
+#endif /* ASSERT_FAIL_HANDLER_H_ */