diff options
author | Matias Elo <matias.elo@nokia.com> | 2018-10-12 15:51:07 +0300 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2018-11-28 17:16:39 +0300 |
commit | a4d92554bdb13f7aa3a1ab2ef212f080d5b5abcd (patch) | |
tree | 4e80b101e830f3af5a3643d7e6b89df2a79dc89a /example/time/time_global_test.c | |
parent | 1ecf1ddef06e0bb00641f2eb6605c34640c603ff (diff) |
example: use mem_model from helper options
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@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 | 15 |
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; |