From e6c4672e82fcd7f5a88beef3f344965c4648445a Mon Sep 17 00:00:00 2001 From: Oleksandr Tymoshenko Date: Fri, 13 Feb 2015 02:10:09 +0000 Subject: [PATCH] Fix build without INVARIANTS/INVARIANT_SUPPORT: - Replace "emulation" of return in lmutex_lock_interruptible macros by proper static/inline function. Submitted by: Guy Yur --- sys/contrib/vchiq/interface/compat/vchi_bsd.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/contrib/vchiq/interface/compat/vchi_bsd.h b/sys/contrib/vchiq/interface/compat/vchi_bsd.h index 2e665b44141e..9ea3784388e2 100644 --- a/sys/contrib/vchiq/interface/compat/vchi_bsd.h +++ b/sys/contrib/vchiq/interface/compat/vchi_bsd.h @@ -151,10 +151,16 @@ struct mutex { #define lmutex_init(lock) mtx_init(&(lock)->mtx, #lock, NULL, MTX_DEF) #define lmutex_lock(lock) mtx_lock(&(lock)->mtx) -#define lmutex_lock_interruptible(lock) (mtx_lock(&(lock)->mtx),0) #define lmutex_unlock(lock) mtx_unlock(&(lock)->mtx) #define lmutex_destroy(lock) mtx_destroy(&(lock)->mtx) +static __inline int +lmutex_lock_interruptible(struct mutex *lock) +{ + mtx_lock(&(lock)->mtx); + return 0; +} + /* * Rwlock API */