Add a PROC_TRYLOCK() macro to perform a mtx_trylock() on the process lock.
This commit is contained in:
parent
f5d325c599
commit
d58f6ddef7
@ -447,6 +447,7 @@ sigonstack(size_t sp)
|
||||
|
||||
/* Lock and unlock a process. */
|
||||
#define PROC_LOCK(p) mtx_lock(&(p)->p_mtx)
|
||||
#define PROC_TRYLOCK(p) mtx_trylock(&(p)->p_mtx)
|
||||
#define PROC_UNLOCK(p) mtx_unlock(&(p)->p_mtx)
|
||||
#define PROC_UNLOCK_NOSWITCH(p) \
|
||||
mtx_unlock_flags(&(p)->p_mtx, MTX_NOSWITCH)
|
||||
|
Loading…
Reference in New Issue
Block a user