From 4fd5981b6a1b6e6050ef6758bf9dcb6bd890c459 Mon Sep 17 00:00:00 2001 From: jhb Date: Fri, 11 May 2001 21:28:37 +0000 Subject: [PATCH] Add a new macro to test if a process' proc lock is held by the current thread: PROC_LOCKED(). --- sys/sys/proc.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/sys/proc.h b/sys/sys/proc.h index d1115d8c6514..2d2f1f83f851 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. */