aboutsummaryrefslogtreecommitdiff
path: root/example/time/time_global_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'example/time/time_global_test.c')
-rw-r--r--example/time/time_global_test.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/example/time/time_global_test.c b/example/time/time_global_test.c
index 317f9a270..6c56d6c6e 100644
--- a/example/time/time_global_test.c
+++ b/example/time/time_global_test.c
@@ -254,16 +254,25 @@ int main(int argc, char *argv[])
odp_shm_t shm_glbls = ODP_SHM_INVALID;
odp_shm_t shm_log = ODP_SHM_INVALID;
int log_size, log_enries_num;
+ odph_helper_options_t helper_options;
odph_odpthread_t thread_tbl[MAX_WORKERS];
odp_instance_t instance;
+ odp_init_t init_param;
odph_odpthread_params_t thr_params;
- /* let helper collect its own arguments (e.g. --odph_proc) */
+ printf("\nODP global time test starts\n");
+
+ /* Let helper collect its own arguments (e.g. --odph_proc) */
argc = odph_parse_options(argc, argv);
+ if (odph_options(&helper_options)) {
+ EXAMPLE_ERR("Error: reading ODP helper options failed.\n");
+ exit(EXIT_FAILURE);
+ }
- printf("\nODP global time test starts\n");
+ odp_init_param_init(&init_param);
+ init_param.mem_model = helper_options.mem_model;
- if (odp_init_global(&instance, NULL, NULL)) {
+ if (odp_init_global(&instance, &init_param, NULL)) {
err = 1;
EXAMPLE_ERR("ODP global init failed.\n");
goto end;