Skip to content

Commit

Permalink
net/hinic: annotate pthread mutex
Browse files Browse the repository at this point in the history
Annotate wrappers on top of the pthread mutex API.

Signed-off-by: David Marchand <[email protected]>
  • Loading branch information
david-marchand committed Nov 18, 2024
1 parent 223887d commit f6ea201
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 6 additions & 0 deletions drivers/net/hinic/base/hinic_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}
Expand Down
4 changes: 0 additions & 4 deletions drivers/net/hinic/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,3 @@ sources = files(
)

includes += include_directories('base')

if is_freebsd
annotate_locks = false
endif

0 comments on commit f6ea201

Please sign in to comment.