Add a PROC_TRYLOCK() macro to perform a mtx_trylock() on the process lock.

This commit is contained in:
John Baldwin 2001-05-15 23:19:52 +00:00
parent f5d325c599
commit d58f6ddef7

View File

@ -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)