This patch updates example programs to reflect API name changes in odp_barrier.h for ODP v1.0
Signed-off-by: Bill Fischofer <[email protected]> --- example/ipsec/odp_ipsec.c | 4 ++-- example/odp_example/odp_example.c | 46 +++++++++++++++++++-------------------- example/timer/odp_timer_test.c | 4 ++-- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/example/ipsec/odp_ipsec.c b/example/ipsec/odp_ipsec.c index 908bd95..55af90b 100644 --- a/example/ipsec/odp_ipsec.c +++ b/example/ipsec/odp_ipsec.c @@ -1043,7 +1043,7 @@ void *pktio_thread(void *arg ODP_UNUSED) printf("Pktio thread [%02i] starts\n", thr); - odp_barrier_sync(&sync_barrier); + odp_barrier_wait(&sync_barrier); /* Loop packets */ for (;;) { @@ -1222,7 +1222,7 @@ main(int argc, char *argv[]) printf("Num worker threads: %i\n", num_workers); /* Create a barrier to synchronize thread startup */ - odp_barrier_init_count(&sync_barrier, num_workers); + odp_barrier_init(&sync_barrier, num_workers); /* * By default core #0 runs Linux kernel background tasks. diff --git a/example/odp_example/odp_example.c b/example/odp_example/odp_example.c index d0ec977..1ebccdb 100644 --- a/example/odp_example/odp_example.c +++ b/example/odp_example/odp_example.c @@ -353,7 +353,7 @@ static int test_schedule_one_single(const char *str, int thr, ns = odp_time_cycles_to_ns(cycles); tot = i; - odp_barrier_sync(barrier); + odp_barrier_wait(barrier); clear_sched_queues(); cycles = cycles/tot; @@ -414,7 +414,7 @@ static int test_schedule_one_many(const char *str, int thr, ns = odp_time_cycles_to_ns(cycles); tot = i; - odp_barrier_sync(barrier); + odp_barrier_wait(barrier); clear_sched_queues(); cycles = cycles/tot; @@ -489,7 +489,7 @@ static int test_schedule_single(const char *str, int thr, cycles = odp_time_diff_cycles(t1, t2); ns = odp_time_cycles_to_ns(cycles); - odp_barrier_sync(barrier); + odp_barrier_wait(barrier); clear_sched_queues(); cycles = cycles/tot; @@ -568,7 +568,7 @@ static int test_schedule_many(const char *str, int thr, cycles = odp_time_diff_cycles(t1, t2); ns = odp_time_cycles_to_ns(cycles); - odp_barrier_sync(barrier); + odp_barrier_wait(barrier); clear_sched_queues(); cycles = cycles/tot; @@ -675,7 +675,7 @@ static int test_schedule_multi(const char *str, int thr, cycles = odp_time_diff_cycles(t1, t2); ns = odp_time_cycles_to_ns(cycles); - odp_barrier_sync(barrier); + odp_barrier_wait(barrier); clear_sched_queues(); if (tot) { @@ -724,10 +724,10 @@ static void *run_thread(void *arg) /* * Test barriers back-to-back */ - odp_barrier_sync(barrier); - odp_barrier_sync(barrier); - odp_barrier_sync(barrier); - odp_barrier_sync(barrier); + odp_barrier_wait(barrier); + odp_barrier_wait(barrier); + odp_barrier_wait(barrier); + odp_barrier_wait(barrier); /* * Find the buffer pool @@ -739,48 +739,48 @@ static void *run_thread(void *arg) return NULL; } - odp_barrier_sync(barrier); + odp_barrier_wait(barrier); if (test_alloc_single(thr, msg_pool)) return NULL; - odp_barrier_sync(barrier); + odp_barrier_wait(barrier); if (test_alloc_multi(thr, msg_pool)) return NULL; - odp_barrier_sync(barrier); + odp_barrier_wait(barrier); if (test_poll_queue(thr, msg_pool)) return NULL; /* Low prio */ - odp_barrier_sync(barrier); + odp_barrier_wait(barrier); if (test_schedule_one_single("sched_one_s_lo", thr, msg_pool, ODP_SCHED_PRIO_LOWEST, barrier)) return NULL; - odp_barrier_sync(barrier); + odp_barrier_wait(barrier); if (test_schedule_single("sched_____s_lo", thr, msg_pool, ODP_SCHED_PRIO_LOWEST, barrier)) return NULL; - odp_barrier_sync(barrier); + odp_barrier_wait(barrier); if (test_schedule_one_many("sched_one_m_lo", thr, msg_pool, ODP_SCHED_PRIO_LOWEST, barrier)) return NULL; - odp_barrier_sync(barrier); + odp_barrier_wait(barrier); if (test_schedule_many("sched_____m_lo", thr, msg_pool, ODP_SCHED_PRIO_LOWEST, barrier)) return NULL; - odp_barrier_sync(barrier); + odp_barrier_wait(barrier); if (test_schedule_multi("sched_multi_lo", thr, msg_pool, ODP_SCHED_PRIO_LOWEST, barrier)) @@ -788,31 +788,31 @@ static void *run_thread(void *arg) /* High prio */ - odp_barrier_sync(barrier); + odp_barrier_wait(barrier); if (test_schedule_one_single("sched_one_s_hi", thr, msg_pool, ODP_SCHED_PRIO_HIGHEST, barrier)) return NULL; - odp_barrier_sync(barrier); + odp_barrier_wait(barrier); if (test_schedule_single("sched_____s_hi", thr, msg_pool, ODP_SCHED_PRIO_HIGHEST, barrier)) return NULL; - odp_barrier_sync(barrier); + odp_barrier_wait(barrier); if (test_schedule_one_many("sched_one_m_hi", thr, msg_pool, ODP_SCHED_PRIO_HIGHEST, barrier)) return NULL; - odp_barrier_sync(barrier); + odp_barrier_wait(barrier); if (test_schedule_many("sched_____m_hi", thr, msg_pool, ODP_SCHED_PRIO_HIGHEST, barrier)) return NULL; - odp_barrier_sync(barrier); + odp_barrier_wait(barrier); if (test_schedule_multi("sched_multi_hi", thr, msg_pool, ODP_SCHED_PRIO_HIGHEST, barrier)) @@ -1105,7 +1105,7 @@ int main(int argc, char *argv[]) odp_shm_print_all(); /* Barrier to sync test case execution */ - odp_barrier_init_count(&globals->barrier, num_workers); + odp_barrier_init(&globals->barrier, num_workers); if (args.proc_mode) { int ret; diff --git a/example/timer/odp_timer_test.c b/example/timer/odp_timer_test.c index 78b2ae2..f959a25 100644 --- a/example/timer/odp_timer_test.c +++ b/example/timer/odp_timer_test.c @@ -135,7 +135,7 @@ static void *run_thread(void *ptr) return NULL; } - odp_barrier_sync(&test_barrier); + odp_barrier_wait(&test_barrier); test_abs_timeouts(thr, args); @@ -372,7 +372,7 @@ int main(int argc, char *argv[]) printf("\n"); /* Barrier to sync test case execution */ - odp_barrier_init_count(&test_barrier, num_workers); + odp_barrier_init(&test_barrier, num_workers); /* Create and launch worker threads */ odph_linux_pthread_create(thread_tbl, num_workers, first_core, -- 1.8.3.2 _______________________________________________ lng-odp mailing list [email protected] http://lists.linaro.org/mailman/listinfo/lng-odp
