aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorMatias Elo <matias.elo@nokia.com>2023-12-13 14:59:38 +0200
committerMatias Elo <matias.elo@nokia.com>2023-12-20 09:22:57 +0200
commit2a2a53ffacf6e1103b6a689f174af8a1188a9842 (patch)
tree7d9cda53dc9f84d87f401cfee20fa16131defcdf /example
parent0f45938e08ed3c013c9649a78084726488e04c1d (diff)
example: start using new odp_timer_pool_start_multi() call
Update example applications to utilize new odp_timer_pool_start_multi() API. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'example')
-rw-r--r--example/debug/odp_debug.c5
-rw-r--r--example/sysinfo/odp_sysinfo.c5
-rw-r--r--example/timer/odp_timer_accuracy.c6
-rw-r--r--example/timer/odp_timer_simple.c7
-rw-r--r--example/timer/odp_timer_test.c6
5 files changed, 24 insertions, 5 deletions
diff --git a/example/debug/odp_debug.c b/example/debug/odp_debug.c
index cca6fa939..a2f322e09 100644
--- a/example/debug/odp_debug.c
+++ b/example/debug/odp_debug.c
@@ -435,7 +435,10 @@ static int timer_debug(void)
return -1;
}
- odp_timer_pool_start();
+ if (odp_timer_pool_start_multi(&timer_pool, 1) != 1) {
+ ODPH_ERR("Timer pool start failed\n");
+ return -1;
+ }
odp_queue_param_init(&queue_param);
if (timer_capa.queue_type_sched)
diff --git a/example/sysinfo/odp_sysinfo.c b/example/sysinfo/odp_sysinfo.c
index 0bebac4a2..3d95087a5 100644
--- a/example/sysinfo/odp_sysinfo.c
+++ b/example/sysinfo/odp_sysinfo.c
@@ -579,7 +579,10 @@ static int timer_capability(appl_args_t *appl_args)
return -1;
}
- odp_timer_pool_start();
+ if (odp_timer_pool_start_multi(&pool, 1) != 1) {
+ ODPH_ERR("odp_timer_pool_start_multi() failed for clock source: %d\n", i);
+ return -1;
+ }
ret = odp_timer_pool_info(pool, info);
if (ret) {
diff --git a/example/timer/odp_timer_accuracy.c b/example/timer/odp_timer_accuracy.c
index 83ca371d9..23c40e66f 100644
--- a/example/timer/odp_timer_accuracy.c
+++ b/example/timer/odp_timer_accuracy.c
@@ -671,7 +671,11 @@ static int create_timers(test_global_t *test_global)
return -1;
}
- odp_timer_pool_start();
+ if (odp_timer_pool_start_multi(&timer_pool, 1) != 1) {
+ ODPH_ERR("Timer pool start failed\n");
+ return -1;
+ }
+
odp_timer_pool_print(timer_pool);
/* Spend some time so that current tick would not be zero */
diff --git a/example/timer/odp_timer_simple.c b/example/timer/odp_timer_simple.c
index b1c818c76..681f95714 100644
--- a/example/timer/odp_timer_simple.c
+++ b/example/timer/odp_timer_simple.c
@@ -82,7 +82,12 @@ int main(int argc ODP_UNUSED, char *argv[] ODP_UNUSED)
goto err;
}
- odp_timer_pool_start();
+ if (odp_timer_pool_start_multi(&timer_pool, 1) != 1) {
+ ODPH_ERR("Timer pool start failed\n");
+ ret += 1;
+ goto err;
+ }
+
/* Configure scheduler */
odp_schedule_config(NULL);
diff --git a/example/timer/odp_timer_test.c b/example/timer/odp_timer_test.c
index 924ffe13f..8cda4043a 100644
--- a/example/timer/odp_timer_test.c
+++ b/example/timer/odp_timer_test.c
@@ -456,7 +456,11 @@ int main(int argc, char *argv[])
ODPH_ERR("Timer pool create failed.\n");
goto err;
}
- odp_timer_pool_start();
+
+ if (odp_timer_pool_start_multi(&gbls->tp, 1) != 1) {
+ ODPH_ERR("Timer pool start failed\n");
+ return -1;
+ }
odp_shm_print_all();
(void)odp_timer_pool_info(gbls->tp, &tpinfo);