aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorSantosh Shukla <santosh.shukla@linaro.org>2014-08-04 11:07:18 +0530
committerMaxim Uvarov <maxim.uvarov@linaro.org>2014-08-06 23:48:05 +0400
commit3a00de5701c80e0feedb3664ec572cb7ac86fb9e (patch)
tree582b0e6d799f3b90300e641dc27912fe42caf687 /example
parent57611a5057abfa20842593a049edc7ad9386e468 (diff)
linux-generic: Fix incorrect thread_tbl index in apps
few of odp example and test application passing incorrect thread_tbl index entry (thread_tbl base addr) to odp_linux_pthread_create(thread_tbl^^, 1, ..) api. This patch a common fix for those odp application. Signed-off-by: Santosh Shukla <santosh.shukla@linaro.org>
Diffstat (limited to 'example')
-rw-r--r--example/generator/odp_generator.c6
-rw-r--r--example/l2fwd/odp_l2fwd.c2
-rw-r--r--example/packet/odp_pktio.c2
-rw-r--r--example/packet_netmap/odp_pktio_netmap.c4
4 files changed, 7 insertions, 7 deletions
diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c
index e4a72fad8..b10372e73 100644
--- a/example/generator/odp_generator.c
+++ b/example/generator/odp_generator.c
@@ -611,13 +611,13 @@ int main(int argc, char *argv[])
args->thread[1].pktio_dev = args->appl.if_names[0];
args->thread[1].pool = pool;
args->thread[1].mode = args->appl.mode;
- odp_linux_pthread_create(thread_tbl, 1, 0,
+ odp_linux_pthread_create(&thread_tbl[1], 1, 0,
gen_recv_thread, &args->thread[1]);
args->thread[0].pktio_dev = args->appl.if_names[0];
args->thread[0].pool = pool;
args->thread[0].mode = args->appl.mode;
- odp_linux_pthread_create(thread_tbl, 1, 0,
+ odp_linux_pthread_create(&thread_tbl[0], 1, 0,
gen_send_thread, &args->thread[0]);
/* only wait send thread to join */
@@ -649,7 +649,7 @@ int main(int argc, char *argv[])
* because each thread might get different arguments.
* Calls odp_thread_create(cpu) for each thread
*/
- odp_linux_pthread_create(thread_tbl, 1,
+ odp_linux_pthread_create(&thread_tbl[i], 1,
core, thr_run_func,
&args->thread[i]);
}
diff --git a/example/l2fwd/odp_l2fwd.c b/example/l2fwd/odp_l2fwd.c
index e331ff262..f89ea7a1a 100644
--- a/example/l2fwd/odp_l2fwd.c
+++ b/example/l2fwd/odp_l2fwd.c
@@ -411,7 +411,7 @@ int main(int argc, char *argv[])
thr_run_func = pktio_ifburst_thread;
else /* APPL_MODE_PKT_QUEUE */
thr_run_func = pktio_queue_thread;
- odp_linux_pthread_create(thread_tbl, 1, core, thr_run_func,
+ odp_linux_pthread_create(&thread_tbl[i], 1, core, thr_run_func,
&gbl_args->thread[i]);
}
diff --git a/example/packet/odp_pktio.c b/example/packet/odp_pktio.c
index edf8cfd6f..247a28a70 100644
--- a/example/packet/odp_pktio.c
+++ b/example/packet/odp_pktio.c
@@ -375,7 +375,7 @@ int main(int argc, char *argv[])
* because each thread might get different arguments.
* Calls odp_thread_create(cpu) for each thread
*/
- odp_linux_pthread_create(thread_tbl, 1, core, thr_run_func,
+ odp_linux_pthread_create(&thread_tbl[i], 1, core, thr_run_func,
&args->thread[i]);
}
diff --git a/example/packet_netmap/odp_pktio_netmap.c b/example/packet_netmap/odp_pktio_netmap.c
index 7d33b19b5..b49aa613e 100644
--- a/example/packet_netmap/odp_pktio_netmap.c
+++ b/example/packet_netmap/odp_pktio_netmap.c
@@ -334,8 +334,8 @@ int main(int argc, char *argv[])
* Create threads one-by-one instead of all-at-once,
* because each thread might get different arguments
*/
- odp_linux_pthread_create(thread_tbl, 1, i, pktio_queue_thread,
- NULL);
+ odp_linux_pthread_create(&thread_tbl[i], 1, i,
+ pktio_queue_thread, NULL);
}
/* Master thread waits for other threads to exit */