aboutsummaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorMike Holmes <mike.holmes@linaro.org>2014-10-08 08:32:07 -0400
committerMaxim Uvarov <maxim.uvarov@linaro.org>2014-10-13 20:11:23 +0400
commit6f9938ee9e4ec82ea4c0ee608c6148f1aa7c1264 (patch)
treea95732882c5f9f5159ba870b5341f04f66883b19 /platform
parent1e273a210cbf5a591633954b04b8ac8a12a5ca1f (diff)
Add global_init params
Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Ciprian Barbu <ciprian.barbu@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform')
-rw-r--r--platform/linux-generic/include/api/odp_init.h35
-rw-r--r--platform/linux-generic/odp_init.c3
2 files changed, 29 insertions, 9 deletions
diff --git a/platform/linux-generic/include/api/odp_init.h b/platform/linux-generic/include/api/odp_init.h
index 13c8e44cb..fab4f6edb 100644
--- a/platform/linux-generic/include/api/odp_init.h
+++ b/platform/linux-generic/include/api/odp_init.h
@@ -8,7 +8,7 @@
/**
* @file
*
- * ODP initialisation
+ * ODP initialization
*/
#ifndef ODP_INIT_H_
@@ -24,20 +24,39 @@ extern "C" {
+/** ODP initialization data.
+ * Data that is required to initialize the ODP API with the
+ * application specific data such as specifying a logging callback, the log
+ * level etc.
+ */
+typedef struct odp_init_t {
+} odp_init_t;
+
+/** ODP platform initialization data.
+ * @note ODP API does nothing with this data. It is the underlying
+ * implementation that requires it and any data passed here is not portable.
+ * It is required that the application takes care of identifying and
+ * passing any required platform specific data.
+ */
+
+typedef struct odp_platform_init_t {
+} odp_platform_init_t;
+
/**
- * Perform global ODP initalisation.
- *
- * This function must be called once before calling
- * any other ODP API functions.
+ * Perform global ODP initialization.
*
+ * This function must be called once before calling any other ODP API
+ * functions.
+ * @param[in] params Those parameters that are interpreted by the ODP API
+ * @param[in] platform_params Those parameters that are passed without
+ * interpretation by the ODP API to the implementation.
* @return 0 if successful
*/
-int odp_init_global(void);
-
+int odp_init_global(odp_init_t *params, odp_platform_init_t *platform_params);
/**
- * Perform thread local ODP initalisation.
+ * Perform thread local ODP initialization.
*
* All threads must call this function before calling
* any other ODP API functions.
diff --git a/platform/linux-generic/odp_init.c b/platform/linux-generic/odp_init.c
index 55fa53a91..c97c5aa6e 100644
--- a/platform/linux-generic/odp_init.c
+++ b/platform/linux-generic/odp_init.c
@@ -9,7 +9,8 @@
#include <odp_debug.h>
-int odp_init_global(void)
+int odp_init_global(odp_init_t *params ODP_UNUSED,
+ odp_platform_init_t *platform_params ODP_UNUSED)
{
odp_system_info_init();