mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
Fix build without INVARIANTS/INVARIANT_SUPPORT:
- Replace "emulation" of return in lmutex_lock_interruptible macros by
proper static/inline function.
Submitted by: Guy Yur
This commit is contained in:
parent
7f192d49b7
commit
e6c4672e82
1 changed files with 7 additions and 1 deletions
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue