diff options
author | Petri Savolainen <petri.savolainen@nokia.com> | 2015-05-08 10:07:10 +0300 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2015-06-10 18:42:23 +0300 |
commit | 911861692e36af9a76ee8b77537eb0957714e403 (patch) | |
tree | 11c88dc5e7b5d3bdc3d66779cffeb3ebfa68c482 /helper | |
parent | 6891037b0ccb4e2075d9e9faaa8568c95119f565 (diff) |
api: init: added thread type to local init
User needs to select the thread type (worker or control) of
the initialized thread. Implementation may reserve HW direct access
only to worker threads, while control threads share HW access, etc.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'helper')
-rw-r--r-- | helper/linux.c | 4 | ||||
-rw-r--r-- | helper/test/odp_process.c | 2 | ||||
-rw-r--r-- | helper/test/odp_thread.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/helper/linux.c b/helper/linux.c index da403ab..2d5842c 100644 --- a/helper/linux.c +++ b/helper/linux.c @@ -29,7 +29,7 @@ static void *odp_run_start_routine(void *arg) odp_start_args_t *start_args = arg; /* ODP thread local init */ - if (odp_init_local()) { + if (odp_init_local(ODP_THREAD_WORKER)) { ODP_ERR("Local init failed\n"); return NULL; } @@ -169,7 +169,7 @@ int odph_linux_process_fork_n(odph_linux_process_t *proc_tbl, return -2; } - if (odp_init_local()) { + if (odp_init_local(ODP_THREAD_WORKER)) { ODP_ERR("Local init failed\n"); return -2; } diff --git a/helper/test/odp_process.c b/helper/test/odp_process.c index 627eda1..d3a5943 100644 --- a/helper/test/odp_process.c +++ b/helper/test/odp_process.c @@ -33,7 +33,7 @@ int main(int argc TEST_UNUSED, char *argv[] TEST_UNUSED) exit(EXIT_FAILURE); } - if (odp_init_local()) { + if (odp_init_local(ODP_THREAD_CONTROL)) { LOG_ERR("Error: ODP local init failed.\n"); exit(EXIT_FAILURE); } diff --git a/helper/test/odp_thread.c b/helper/test/odp_thread.c index bd01f24..1de30ab 100644 --- a/helper/test/odp_thread.c +++ b/helper/test/odp_thread.c @@ -34,7 +34,7 @@ int main(int argc TEST_UNUSED, char *argv[] TEST_UNUSED) exit(EXIT_FAILURE); } - if (odp_init_local()) { + if (odp_init_local(ODP_THREAD_CONTROL)) { LOG_ERR("Error: ODP local init failed.\n"); exit(EXIT_FAILURE); } |