aboutsummaryrefslogtreecommitdiff
path: root/include/odp/api
diff options
context:
space:
mode:
authorPetri Savolainen <petri.savolainen@nokia.com>2015-09-15 13:56:22 +0300
committerMaxim Uvarov <maxim.uvarov@linaro.org>2015-10-22 15:44:30 +0300
commitf9c584d9e5d667b196c98f809154116c69052179 (patch)
tree3d5e79816aa520f3ee28210839b8da6c127604e9 /include/odp/api
parentb6e80d7aeb5818a39d8db054b841ff9a19dead5c (diff)
api: init: added thread count params
Added max number of worker/control threads as global init parameters. Implementation can e.g. optimize it's per worker thread resource reservation or configuration accordingly. Maximum values are platform specific. These values come typically from the user as command line arguments, etc. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'include/odp/api')
-rw-r--r--include/odp/api/init.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/include/odp/api/init.h b/include/odp/api/init.h
index 0683d8d3..737ff6d6 100644
--- a/include/odp/api/init.h
+++ b/include/odp/api/init.h
@@ -110,8 +110,18 @@ typedef void (*odp_abort_func_t)(void) ODP_NORETURN;
* @note It is expected that all unassigned members are zero
*/
typedef struct odp_init_t {
- odp_log_func_t log_fn; /**< Replacement for the default log fn */
- odp_abort_func_t abort_fn; /**< Replacement for the default abort fn */
+ /** Maximum number of worker threads the user will run concurrently.
+ Valid range is from 0 to platform specific maximum. Set both
+ num_worker and num_control to zero for default number of threads. */
+ int num_worker;
+ /** Maximum number of control threads the user will run concurrently.
+ Valid range is from 0 to platform specific maximum. Set both
+ num_worker and num_control to zero for default number of threads. */
+ int num_control;
+ /** Replacement for the default log fn */
+ odp_log_func_t log_fn;
+ /** Replacement for the default abort fn */
+ odp_abort_func_t abort_fn;
} odp_init_t;
/**
@@ -133,9 +143,10 @@ typedef struct odp_platform_init_t {
* functions.
*
* @param params Those parameters that are interpreted by the ODP API.
+ * Use NULL to set all parameters to their defaults.
* @param platform_params Those parameters that are passed without
* interpretation by the ODP API to the implementation.
- *
+ * Use NULL to set all parameters to their defaults.
* @retval 0 on success
* @retval <0 on failure
*