aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorHemant Agrawal <Hemant@freescale.com>2015-12-16 15:14:14 +0530
committerMaxim Uvarov <maxim.uvarov@linaro.org>2015-12-16 15:17:44 +0300
commit1a7893cf034dcb0045c3f7a08559b0955b3093b5 (patch)
tree66a975f041bd72d77a2364eed9b7e3f4e328af58 /example
parent8e1694d20324ced76e900f8d48cd7d30418b4f94 (diff)
helper: linux: add thread type in pthread_create
The exisiting helper routine only create the worker threads. However there is a need to use the same for creating the control thread as well. e.g. CLI thread. Signed-off-by: Hemant Agrawal <Hemant@freescale.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'example')
-rw-r--r--example/classifier/odp_classifier.c2
-rw-r--r--example/generator/odp_generator.c9
-rw-r--r--example/ipsec/odp_ipsec.c2
-rw-r--r--example/packet/odp_pktio.c3
-rw-r--r--example/timer/odp_timer_test.c2
5 files changed, 11 insertions, 7 deletions
diff --git a/example/classifier/odp_classifier.c b/example/classifier/odp_classifier.c
index 81e6bf0b..6cf45968 100644
--- a/example/classifier/odp_classifier.c
+++ b/example/classifier/odp_classifier.c
@@ -533,7 +533,7 @@ int main(int argc, char *argv[])
odp_cpumask_set(&thd_mask, cpu);
odph_linux_pthread_create(&thread_tbl[i], &thd_mask,
pktio_receive_thread,
- args);
+ args, ODP_THREAD_WORKER);
cpu = odp_cpumask_next(&cpumask, cpu);
}
diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c
index 01807a0b..f1564972 100644
--- a/example/generator/odp_generator.c
+++ b/example/generator/odp_generator.c
@@ -784,7 +784,8 @@ int main(int argc, char *argv[])
abort();
args->thread[1].mode = args->appl.mode;
odph_linux_pthread_create(&thread_tbl[1], &cpu_mask,
- gen_recv_thread, &args->thread[1]);
+ gen_recv_thread, &args->thread[1],
+ ODP_THREAD_WORKER);
tq = odp_queue_create("", ODP_QUEUE_TYPE_POLL, NULL);
if (tq == ODP_QUEUE_INVALID)
@@ -804,7 +805,8 @@ int main(int argc, char *argv[])
odp_cpumask_zero(&cpu_mask);
odp_cpumask_set(&cpu_mask, cpu_next);
odph_linux_pthread_create(&thread_tbl[0], &cpu_mask,
- gen_send_thread, &args->thread[0]);
+ gen_send_thread, &args->thread[0],
+ ODP_THREAD_WORKER);
} else {
int cpu = odp_cpumask_first(&cpumask);
@@ -849,7 +851,8 @@ int main(int argc, char *argv[])
odph_linux_pthread_create(&thread_tbl[i],
&thd_mask,
thr_run_func,
- &args->thread[i]);
+ &args->thread[i],
+ ODP_THREAD_WORKER);
cpu = odp_cpumask_next(&cpumask, cpu);
}
diff --git a/example/ipsec/odp_ipsec.c b/example/ipsec/odp_ipsec.c
index f0ff2c94..fab10359 100644
--- a/example/ipsec/odp_ipsec.c
+++ b/example/ipsec/odp_ipsec.c
@@ -1333,7 +1333,7 @@ main(int argc, char *argv[])
* Create and init worker threads
*/
odph_linux_pthread_create(thread_tbl, &cpumask,
- pktio_thread, NULL);
+ pktio_thread, NULL, ODP_THREAD_WORKER);
/*
* If there are streams attempt to verify them else
diff --git a/example/packet/odp_pktio.c b/example/packet/odp_pktio.c
index 239c1b03..c42331bb 100644
--- a/example/packet/odp_pktio.c
+++ b/example/packet/odp_pktio.c
@@ -442,7 +442,8 @@ int main(int argc, char *argv[])
odp_cpumask_set(&thd_mask, cpu);
odph_linux_pthread_create(&thread_tbl[i], &thd_mask,
thr_run_func,
- &args->thread[i]);
+ &args->thread[i],
+ ODP_THREAD_WORKER);
cpu = odp_cpumask_next(&cpumask, cpu);
}
diff --git a/example/timer/odp_timer_test.c b/example/timer/odp_timer_test.c
index 8796b663..b7a4fd23 100644
--- a/example/timer/odp_timer_test.c
+++ b/example/timer/odp_timer_test.c
@@ -479,7 +479,7 @@ int main(int argc, char *argv[])
/* Create and launch worker threads */
odph_linux_pthread_create(thread_tbl, &cpumask,
- run_thread, gbls);
+ run_thread, gbls, ODP_THREAD_WORKER);
/* Wait for worker threads to exit */
odph_linux_pthread_join(thread_tbl, num_workers);