From f6ea20188e527624f17d0a9d7212034f65850c7e Mon Sep 17 00:00:00 2001 From: David Marchand Date: Fri, 24 Feb 2023 16:11:41 +0100 Subject: [PATCH] net/hinic: annotate pthread mutex Annotate wrappers on top of the pthread mutex API. Signed-off-by: David Marchand --- drivers/net/hinic/base/hinic_compat.h | 6 ++++++ drivers/net/hinic/meson.build | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/net/hinic/base/hinic_compat.h b/drivers/net/hinic/base/hinic_compat.h index ab9d1b9a021..4b8f9f11824 100644 --- a/drivers/net/hinic/base/hinic_compat.h +++ b/drivers/net/hinic/base/hinic_compat.h @@ -221,6 +221,9 @@ static inline int hinic_mutex_destroy(pthread_mutex_t *pthreadmutex) } static inline int hinic_mutex_lock(pthread_mutex_t *pthreadmutex) +#ifdef RTE_EXEC_ENV_FREEBSD + __rte_exclusive_trylock_function(0, *pthreadmutex) +#endif { int err; struct timespec tout; @@ -236,6 +239,9 @@ static inline int hinic_mutex_lock(pthread_mutex_t *pthreadmutex) } static inline int hinic_mutex_unlock(pthread_mutex_t *pthreadmutex) +#ifdef RTE_EXEC_ENV_FREEBSD + __rte_unlock_function(*pthreadmutex) +#endif { return pthread_mutex_unlock(pthreadmutex); } diff --git a/drivers/net/hinic/meson.build b/drivers/net/hinic/meson.build index 8242e0052e0..dbcf1777822 100644 --- a/drivers/net/hinic/meson.build +++ b/drivers/net/hinic/meson.build @@ -18,7 +18,3 @@ sources = files( ) includes += include_directories('base') - -if is_freebsd - annotate_locks = false -endif