diff options
author | hsu <hsu@FreeBSD.org> | 2003-01-04 11:45:50 +0000 |
---|---|---|
committer | hsu <hsu@FreeBSD.org> | 2003-01-04 11:45:50 +0000 |
commit | 09ca0ee43d11430926c9b2270bf21b55c19725e3 (patch) | |
tree | 059c801b409ef21f19cd8e96d0874abf3b5b2382 | |
parent | 7d6bf51bbf191f7bdf211f11985db584aab0e973 (diff) | |
download | FreeBSD-src-09ca0ee43d11430926c9b2270bf21b55c19725e3.zip FreeBSD-src-09ca0ee43d11430926c9b2270bf21b55c19725e3.tar.gz |
Remove unnecessary lock assertion.
-rw-r--r-- | sys/kern/kern_proc.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index e4a84c3..00f6186 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -71,8 +71,6 @@ MALLOC_DEFINE(M_SESSION, "session", "session header"); static MALLOC_DEFINE(M_PROC, "proc", "Proc structures"); MALLOC_DEFINE(M_SUBPROC, "subproc", "Proc sub-structures"); -static struct proc *dopfind(register pid_t); - static void doenterpgrp(struct proc *, struct pgrp *); static void pgdelete(struct pgrp *); @@ -251,24 +249,12 @@ pfind(pid) register struct proc *p; sx_slock(&allproc_lock); - p = dopfind(pid); - sx_sunlock(&allproc_lock); - return (p); -} - -static struct proc * -dopfind(pid) - register pid_t pid; -{ - register struct proc *p; - - sx_assert(&allproc_lock, SX_LOCKED); - LIST_FOREACH(p, PIDHASH(pid), p_hash) if (p->p_pid == pid) { PROC_LOCK(p); break; } + sx_sunlock(&allproc_lock); return (p); } |