aboutsummaryrefslogtreecommitdiff
path: root/helper
diff options
context:
space:
mode:
authorPetri Savolainen <petri.savolainen@nokia.com>2015-07-09 16:46:16 +0300
committerMaxim Uvarov <maxim.uvarov@linaro.org>2015-07-23 19:21:51 +0300
commit3501aeea1b0316aa5e951e6e601b891a05e0d1c4 (patch)
tree842892b5b9b37e2a2158529f56ad7754211853dd /helper
parentb16afd47225ed07360bd7574ed1970ff544c5d50 (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> Conflicts: helper/linux.c
Diffstat (limited to 'helper')
-rw-r--r--helper/linux.c4
-rw-r--r--helper/test/odp_chksum.c2
-rw-r--r--helper/test/odp_process.c2
-rw-r--r--helper/test/odp_thread.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/helper/linux.c b/helper/linux.c
index 46313f4..a2eacc1 100644
--- a/helper/linux.c
+++ b/helper/linux.c
@@ -58,7 +58,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)) {
ODPH_ERR("Local init failed\n");
return NULL;
}
@@ -203,7 +203,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)) {
ODPH_ERR("Local init failed\n");
return -2;
}
diff --git a/helper/test/odp_chksum.c b/helper/test/odp_chksum.c
index f3c2059..dfd578f 100644
--- a/helper/test/odp_chksum.c
+++ b/helper/test/odp_chksum.c
@@ -126,7 +126,7 @@ int main(int argc TEST_UNUSED, char *argv[] TEST_UNUSED)
exit(EXIT_FAILURE);
}
- if (odp_init_local()) {
+ if (odp_init_local(ODP_THREAD_WORKER)) {
LOG_ERR("Error: ODP local init failed.\n");
exit(EXIT_FAILURE);
}
diff --git a/helper/test/odp_process.c b/helper/test/odp_process.c
index 3483549..97f4669 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 04c6b1e..634be96 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);
}