proc: shave a lock trip on exit if possible
... which happens to be vast majority of the time
This commit is contained in:
parent
7c31de1a3c
commit
80cf427b8d
@ -477,9 +477,11 @@ exit1(struct thread *td, int rval, int signo)
|
|||||||
sx_xunlock(&allproc_lock);
|
sx_xunlock(&allproc_lock);
|
||||||
|
|
||||||
sx_xlock(&proctree_lock);
|
sx_xlock(&proctree_lock);
|
||||||
PROC_LOCK(p);
|
if ((p->p_flag & (P_TRACED | P_PPWAIT | P_PPTRACE)) != 0) {
|
||||||
p->p_flag &= ~(P_TRACED | P_PPWAIT | P_PPTRACE);
|
PROC_LOCK(p);
|
||||||
PROC_UNLOCK(p);
|
p->p_flag &= ~(P_TRACED | P_PPWAIT | P_PPTRACE);
|
||||||
|
PROC_UNLOCK(p);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* killjobc() might drop and re-acquire proctree_lock to
|
* killjobc() might drop and re-acquire proctree_lock to
|
||||||
|
Loading…
Reference in New Issue
Block a user