This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, master has been updated via eec882c78e9ce4aefe1209cfc4da2130aea4cc83 (commit) from 1d26a1ea71eab90d4a761246b7d76f7ffebdbfad (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit eec882c78e9ce4aefe1209cfc4da2130aea4cc83 Author: Matias Elo matias.elo@nokia.com Date: Thu Jun 20 14:01:42 2019 +0300
linux-gen: timer: don't reserve any resources when timers are disabled
Don't reserve any memory or perform initialization if timer feature (odp_feature_t.feat.timer) is marked as not used.
Signed-off-by: Matias Elo matias.elo@nokia.com Reviewed-by: Bill Fischofer billf@me.com
diff --git a/platform/linux-generic/odp_timer.c b/platform/linux-generic/odp_timer.c index 8e98d51ac..e55c68873 100644 --- a/platform/linux-generic/odp_timer.c +++ b/platform/linux-generic/odp_timer.c @@ -1413,6 +1413,12 @@ int odp_timer_init_global(const odp_init_t *params) const char *conf_str; int val = 0;
+ if (params && params->not_used.feat.timer) { + ODP_DBG("Timers disabled\n"); + timer_global = NULL; + return 0; + } + shm = odp_shm_reserve("_odp_timer", sizeof(timer_global_t), ODP_CACHE_LINE_SIZE, 0);
@@ -1452,9 +1458,6 @@ int odp_timer_init_global(const odp_init_t *params) } timer_global->inline_poll_interval = val;
- if (params && params->not_used.feat.timer) - timer_global->use_inline_timers = false; - timer_global->time_per_ratelimit_period = odp_time_global_from_ns(timer_global->min_res_ns / 2);
@@ -1468,7 +1471,7 @@ int odp_timer_init_global(const odp_init_t *params)
int odp_timer_term_global(void) { - if (odp_shm_free(timer_global->shm)) { + if (timer_global && odp_shm_free(timer_global->shm)) { ODP_ERR("Shm free failed for odp_timer\n"); return -1; }
-----------------------------------------------------------------------
Summary of changes: platform/linux-generic/odp_timer.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
hooks/post-receive