aboutsummaryrefslogtreecommitdiff
path: root/include/odp/api/init.h
diff options
context:
space:
mode:
authorMike Holmes <mike.holmes@linaro.org>2015-02-03 06:35:25 -0500
committerMaxim Uvarov <maxim.uvarov@linaro.org>2015-02-03 17:31:04 +0300
commit04a00b80e1a8a4bdbab5adf8612a01162ba0ad8f (patch)
treea0d0f1ab9130198528880981e405a6f505924782 /include/odp/api/init.h
parent07b2f9314085831b205518ae0a7f6d45c546d537 (diff)
api: abort: add weak replacement for abort
Introduce replaceable abort function using weak symbols. Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'include/odp/api/init.h')
-rw-r--r--include/odp/api/init.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/odp/api/init.h b/include/odp/api/init.h
index 6b33987fc..6c241bf71 100644
--- a/include/odp/api/init.h
+++ b/include/odp/api/init.h
@@ -29,6 +29,7 @@ extern "C" {
#include <odp/std_types.h>
+#include <odp/hints.h>
/** @defgroup odp_initialization ODP INITIALIZATION
* Initialisation operations.
@@ -71,6 +72,21 @@ typedef enum odp_log_level {
*/
int odp_override_log(odp_log_level_e level, const char *fmt, ...);
+/**
+ * ODP abort function
+ *
+ * Instead of directly calling abort, all abort calls in the implementation
+ * should be done via this function or its wrappers.
+ *
+ * An Application can override the ODP implementation default abort function
+ * odp_override_abort() by providing an alternative to this weak symbol.
+ *
+ * @warning The override option is not portable and GNU linker dependent
+ * (utilizes function attribute "weak").
+ *
+ * @warning this function shall not return
+ */
+void odp_override_abort(void) ODP_NORETURN;
/** Replaceable logging function */
typedef int (*odp_log_func_t)(odp_log_level_e level, const char *fmt, ...);