aboutsummaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorMike Holmes <mike.holmes@linaro.org>2014-11-18 14:40:40 -0500
committerMaxim Uvarov <maxim.uvarov@linaro.org>2014-11-20 21:43:54 +0300
commit962b5c9c8c19ab7a77b360792f492ff907142ae7 (patch)
treebfa71149e12c1d2005ec0fe2a37c62ed89fa284f /platform
parentb77a3b11986db573c061e18cb5d461d9d5f8307c (diff)
api: odp_hints.h add ODP_WEAK_SYMBOL
Several ODP APIs require that the application is able to replace them with a more appropriate definition. By defining an ODP function as weak the linker is able to replace the definition with the one supplied by the application. Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform')
-rw-r--r--platform/linux-generic/include/api/odp_hints.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/platform/linux-generic/include/api/odp_hints.h b/platform/linux-generic/include/api/odp_hints.h
index bc6d72074..7f048860a 100644
--- a/platform/linux-generic/include/api/odp_hints.h
+++ b/platform/linux-generic/include/api/odp_hints.h
@@ -25,6 +25,11 @@ extern "C" {
#ifdef __GNUC__
+/** Define a weak symbol
+ * This is primarily useful in defining library functions that can be
+ * overridden in user code.
+ */
+#define ODP_WEAK_SYMBOL __attribute__((__weak__))
/**
* Hot code section
@@ -68,6 +73,7 @@ extern "C" {
#else
+#define ODP_WEAK_SYMBOL
#define ODP_HOT_CODE
#define ODP_COLD_CODE
#define odp_likely(x)