Add a new macro to test if a process' proc lock is held by the current
thread: PROC_LOCKED().
This commit is contained in:
parent
a93f12fc68
commit
4fd5981b6a
@ -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. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user