diff options
Diffstat (limited to 'sys/sys/proc.h')
| -rw-r--r-- | sys/sys/proc.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/sys/proc.h b/sys/sys/proc.h index c1e1b202d15b..4f94cd20ba28 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -407,6 +407,14 @@ sigonstack(size_t sp) #define PROC_LOCK(p) mtx_enter(&(p)->p_mtx, MTX_DEF) #define PROC_UNLOCK(p) mtx_exit(&(p)->p_mtx, MTX_DEF) +/* Lock and unlock the proc lists. */ +#define ALLPROC_LOCK(how) \ + lockmgr(&allproc_lock, (how), NULL, CURPROC) + +#define AP_SHARED LK_SHARED +#define AP_EXCLUSIVE LK_EXCLUSIVE +#define AP_RELEASE LK_RELEASE + /* Hold process U-area in memory, normally for ptrace/procfs work. */ #define PHOLD(p) do { \ PROC_LOCK(p); \ |
