diff options
author | jhb <jhb@FreeBSD.org> | 2001-05-11 21:28:37 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-05-11 21:28:37 +0000 |
commit | 4fd5981b6a1b6e6050ef6758bf9dcb6bd890c459 (patch) | |
tree | c909e0b3e3749dd482551af9f023f2499ae16493 /sys | |
parent | a93f12fc686999edbcbef3713689d6e0f9d45930 (diff) | |
download | FreeBSD-src-4fd5981b6a1b6e6050ef6758bf9dcb6bd890c459.zip FreeBSD-src-4fd5981b6a1b6e6050ef6758bf9dcb6bd890c459.tar.gz |
Add a new macro to test if a process' proc lock is held by the current
thread: PROC_LOCKED().
Diffstat (limited to 'sys')
-rw-r--r-- | sys/sys/proc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/proc.h b/sys/sys/proc.h index d1115d8..2d2f1f8 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -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. */ |