From: Maxim Uvarov <maxim.uva...@linaro.org> internal structure should not be named with odp_. Also make code a little bit more consistent to pass type instead of struct to 2 more functions.
Signed-off-by: Maxim Uvarov <maxim.uva...@linaro.org> --- /** Email created from pull request 205 (muvarov:master_timer_cleanup) ** https://github.com/Linaro/odp/pull/205 ** Patch: https://github.com/Linaro/odp/pull/205.patch ** Base sha: 052d2687930e5a99568e9349ca9704ae507e8dc5 ** Merge commit sha: 86cbffb9c3a034c900ff3e6f84ef68c62c9dfa29 **/ platform/linux-generic/include/odp/api/plat/timer_types.h | 4 ++-- platform/linux-generic/odp_timer.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/platform/linux-generic/include/odp/api/plat/timer_types.h b/platform/linux-generic/include/odp/api/plat/timer_types.h index a8891f11f..731921b99 100644 --- a/platform/linux-generic/include/odp/api/plat/timer_types.h +++ b/platform/linux-generic/include/odp/api/plat/timer_types.h @@ -24,9 +24,9 @@ extern "C" { * @{ **/ -struct odp_timer_pool_s; /**< Forward declaration */ +struct _timer_pool_s; /**< Forward declaration */ -typedef struct odp_timer_pool_s *odp_timer_pool_t; +typedef struct _timer_pool_s *odp_timer_pool_t; #define ODP_TIMER_POOL_INVALID NULL diff --git a/platform/linux-generic/odp_timer.c b/platform/linux-generic/odp_timer.c index cecbcead0..fb3b34bb4 100644 --- a/platform/linux-generic/odp_timer.c +++ b/platform/linux-generic/odp_timer.c @@ -166,7 +166,7 @@ static inline void set_next_free(odp_timer *tim, uint32_t nf) * Inludes alloc and free timer *****************************************************************************/ -typedef struct odp_timer_pool_s { +typedef struct _timer_pool_s { /* Put frequently accessed fields in the first cache line */ odp_atomic_u64_t cur_tick;/* Current tick value */ uint64_t min_rel_tck; @@ -205,7 +205,7 @@ static inline _timer_pool_t *handle_to_tp(odp_timer_t hdl) } static inline uint32_t handle_to_idx(odp_timer_t hdl, - struct odp_timer_pool_s *tp) + _timer_pool_t *tp) { uint32_t idx = _odp_typeval(hdl) & ((1U << INDEX_BITS) - 1U); __builtin_prefetch(&tp->tick_buf[idx], 0, 0); @@ -214,8 +214,8 @@ static inline uint32_t handle_to_idx(odp_timer_t hdl, ODP_ABORT("Invalid timer handle %#x\n", hdl); } -static inline odp_timer_t tp_idx_to_handle(struct odp_timer_pool_s *tp, - uint32_t idx) +static inline odp_timer_t tp_idx_to_handle(_timer_pool_t *tp, + uint32_t idx) { ODP_ASSERT(idx < (1U << INDEX_BITS)); return _odp_cast_scalar(odp_timer_t, (tp->tp_idx << INDEX_BITS) | idx);