diff options
author | Christophe Milard <christophe.milard@linaro.org> | 2016-04-14 18:58:03 +0200 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2016-05-23 15:06:59 +0300 |
commit | 39a2fbe50312ca1cbd512c9c3b0d7899b966bdf6 (patch) | |
tree | 8efe56b4dccf6c0b1c9ebdb46b63828341c6a4a2 /example/time/time_global_test.c | |
parent | 8ece9c547cc19f10de1e1faf8f3a9ae6ee7cee62 (diff) |
example: time: using agnostic function for ODP threads
time is changed to use the implementation agnostic ODP thread
create and join functions, from helpers.
time is hence no longer aware on how the odpthread is
implemented.
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
Reviewed-by: Brian Brooks <brian.brooks@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'example/time/time_global_test.c')
-rw-r--r-- | example/time/time_global_test.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/example/time/time_global_test.c b/example/time/time_global_test.c index 8e3de5ce0..df4da4e3f 100644 --- a/example/time/time_global_test.c +++ b/example/time/time_global_test.c @@ -163,7 +163,7 @@ static void test_global_timestamps(test_globals_t *gbls, * * @return Pointer to exit status */ -static void *run_thread(void *ptr) +static int run_thread(void *ptr) { int thr; uint32_t id; @@ -238,7 +238,7 @@ static void *run_thread(void *ptr) printf("Thread %i exits\n", thr); fflush(NULL); - return NULL; + return 0; } int main(void) @@ -252,9 +252,9 @@ int main(void) odp_shm_t shm_glbls = ODP_SHM_INVALID; odp_shm_t shm_log = ODP_SHM_INVALID; int log_size, log_enries_num; - odph_linux_pthread_t thread_tbl[MAX_WORKERS]; + odph_odpthread_t thread_tbl[MAX_WORKERS]; odp_instance_t instance; - odph_linux_thr_params_t thr_params; + odph_odpthread_params_t thr_params; printf("\nODP global time test starts\n"); @@ -323,10 +323,10 @@ int main(void) thr_params.instance = instance; /* Create and launch worker threads */ - odph_linux_pthread_create(thread_tbl, &cpumask, &thr_params); + odph_odpthreads_create(thread_tbl, &cpumask, &thr_params); /* Wait for worker threads to exit */ - odph_linux_pthread_join(thread_tbl, num_workers); + odph_odpthreads_join(thread_tbl); print_log(gbls); |