From 73e5b8a24f3e6b421c6d4a421f039cc0897664e4 Mon Sep 17 00:00:00 2001 From: Matias Elo Date: Mon, 18 Sep 2023 16:30:18 +0300 Subject: [PATCH] example: sysinfo: add timer pool start call Call odp_timer_pool_start() before querying timer pool info. Depending on the implementation, some information may only be available after the timer pool has been started. Also, print clock source in case of timer API call failures. Signed-off-by: Matias Elo Reviewed-by: Petri Savolainen --- example/sysinfo/odp_sysinfo.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/example/sysinfo/odp_sysinfo.c b/example/sysinfo/odp_sysinfo.c index 4564067b86..05635eec29 100644 --- a/example/sysinfo/odp_sysinfo.c +++ b/example/sysinfo/odp_sysinfo.c @@ -556,7 +556,7 @@ static int timer_capability(appl_args_t *appl_args) if (ret == -1) continue; if (ret < -1) { - ODPH_ERR("odp_timer_capability() failed: %d\n", ret); + ODPH_ERR("odp_timer_capability() for clock source %d failed: %d\n", i, ret); return -1; } @@ -573,9 +573,11 @@ static int timer_capability(appl_args_t *appl_args) return -1; } + odp_timer_pool_start(); + ret = odp_timer_pool_info(pool, info); if (ret) { - ODPH_ERR("odp_timer_pool_info() failed: %d\n", ret); + ODPH_ERR("odp_timer_pool_info() for clock source %d failed: %d\n", i, ret); return -1; }