diff options
Diffstat (limited to 'test/performance/odp_sched_latency.c')
-rw-r--r-- | test/performance/odp_sched_latency.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/test/performance/odp_sched_latency.c b/test/performance/odp_sched_latency.c index c6b659aac..2910dcdbc 100644 --- a/test/performance/odp_sched_latency.c +++ b/test/performance/odp_sched_latency.c @@ -705,8 +705,9 @@ int main(int argc, char *argv[]) odp_instance_t instance; odp_init_t init_param; odph_helper_options_t helper_options; - odph_odpthread_t *thread_tbl; - odph_odpthread_params_t thr_params; + odph_thread_t *thread_tbl; + odph_thread_common_param_t thr_common; + odph_thread_param_t thr_param; odp_cpumask_t cpumask; odp_pool_t pool; odp_pool_capability_t pool_capa; @@ -766,7 +767,7 @@ int main(int argc, char *argv[]) printf(" First CPU: %i\n", odp_cpumask_first(&cpumask)); printf(" CPU mask: %s\n", cpumaskstr); - thread_tbl = calloc(sizeof(odph_odpthread_t), num_workers); + thread_tbl = calloc(sizeof(odph_thread_t), num_workers); if (!thread_tbl) { ODPH_ERR("no memory for thread_tbl\n"); return -1; @@ -858,15 +859,20 @@ int main(int argc, char *argv[]) odp_barrier_init(&globals->barrier, num_workers); /* Create and launch worker threads */ - memset(&thr_params, 0, sizeof(thr_params)); - thr_params.thr_type = ODP_THREAD_WORKER; - thr_params.instance = instance; - thr_params.start = run_thread; - thr_params.arg = NULL; - odph_odpthreads_create(thread_tbl, &cpumask, &thr_params); + odph_thread_common_param_init(&thr_common); + thr_common.instance = instance; + thr_common.cpumask = &cpumask; + thr_common.share_param = 1; + + odph_thread_param_init(&thr_param); + thr_param.start = run_thread; + thr_param.arg = NULL; + thr_param.thr_type = ODP_THREAD_WORKER; + + odph_thread_create(thread_tbl, &thr_common, &thr_param, num_workers); /* Wait for worker threads to terminate */ - odph_odpthreads_join(thread_tbl); + odph_thread_join(thread_tbl, num_workers); free(thread_tbl); printf("ODP scheduling latency test complete\n\n"); |