Add the missing internal doxygen documentation for the ticketlock_inlines functions used to accelerate odp-linux even when building with --enable-abi-compat=yes
Signed-off-by: Bill Fischofer <bill.fischo...@linaro.org> --- .../include/odp/api/plat/ticketlock_inlines.h | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/platform/linux-generic/include/odp/api/plat/ticketlock_inlines.h b/platform/linux-generic/include/odp/api/plat/ticketlock_inlines.h index 957d22e..87432a7 100644 --- a/platform/linux-generic/include/odp/api/plat/ticketlock_inlines.h +++ b/platform/linux-generic/include/odp/api/plat/ticketlock_inlines.h @@ -18,6 +18,11 @@ #include <odp/api/sync.h> #include <odp/api/cpu.h> +/** @internal + * Acquire ticket lock. + * + * @param ticketlock Pointer to a ticket lock + */ static inline void _odp_ticketlock_lock(odp_ticketlock_t *ticketlock) { uint32_t ticket; @@ -33,6 +38,14 @@ static inline void _odp_ticketlock_lock(odp_ticketlock_t *ticketlock) odp_cpu_pause(); } +/** @internal + * Try to acquire ticket lock. + * + * @param tklock Pointer to a ticket lock + * + * @retval 1 lock acquired + * @retval 0 lock not acquired + */ static inline int _odp_ticketlock_trylock(odp_ticketlock_t *tklock) { /* We read 'next_ticket' and 'cur_ticket' non-atomically which should @@ -61,6 +74,11 @@ static inline int _odp_ticketlock_trylock(odp_ticketlock_t *tklock) return 0; } +/** @internal + * Release ticket lock + * + * @param ticketlock Pointer to a ticket lock + */ static inline void _odp_ticketlock_unlock(odp_ticketlock_t *ticketlock) { /* Release the lock by incrementing 'cur_ticket'. As we are the @@ -73,6 +91,14 @@ static inline void _odp_ticketlock_unlock(odp_ticketlock_t *ticketlock) odp_atomic_store_rel_u32(&ticketlock->cur_ticket, cur + 1); } +/** @internal + * Check if ticket lock is locked + * + * @param ticketlock Pointer to a ticket lock + * + * @retval 1 the lock is busy (locked) + * @retval 0 the lock is available (unlocked) + */ static inline int _odp_ticketlock_is_locked(odp_ticketlock_t *ticketlock) { /* Compare 'cur_ticket' with 'next_ticket'. Ideally we should read -- 2.7.4