Add a new macro to test if a process' proc lock is held by the current

thread: PROC_LOCKED().
This commit is contained in:
jhb 2001-05-11 21:28:37 +00:00
parent a93f12fc68
commit 4fd5981b6a

View File

@ -450,6 +450,7 @@ sigonstack(size_t sp)
#define PROC_UNLOCK(p) mtx_unlock(&(p)->p_mtx)
#define PROC_UNLOCK_NOSWITCH(p) \
mtx_unlock_flags(&(p)->p_mtx, MTX_NOSWITCH)
#define PROC_LOCKED(p) mtx_owned(&(p)->p_mtx)
#define PROC_LOCK_ASSERT(p, type) mtx_assert(&(p)->p_mtx, (type))
/* Hold process U-area in memory, normally for ptrace/procfs work. */