mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-22 01:34:09 +00:00
The proc lock is sufficient to test p_state against PRS_ZOMBIE, so don't
needlessly lock sched_lock.
This commit is contained in:
parent
9d8643eca6
commit
4cac73c759
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=113616
|
@ -1272,10 +1272,8 @@ svr4_sys_waitsys(td, uap)
|
|||
continue;
|
||||
}
|
||||
nfound++;
|
||||
mtx_lock_spin(&sched_lock);
|
||||
if ((q->p_state == PRS_ZOMBIE) &&
|
||||
((uap->options & (SVR4_WEXITED|SVR4_WTRAPPED)))) {
|
||||
mtx_unlock_spin(&sched_lock);
|
||||
PROC_UNLOCK(q);
|
||||
sx_sunlock(&proctree_lock);
|
||||
*retval = 0;
|
||||
|
@ -1396,7 +1394,6 @@ svr4_sys_waitsys(td, uap)
|
|||
if (P_SHOULDSTOP(q) && ((q->p_flag & P_WAITED) == 0) &&
|
||||
(q->p_flag & P_TRACED ||
|
||||
(uap->options & (SVR4_WSTOPPED|SVR4_WCONTINUED)))) {
|
||||
mtx_unlock_spin(&sched_lock);
|
||||
DPRINTF(("jobcontrol %d\n", q->p_pid));
|
||||
if (((uap->options & SVR4_WNOWAIT)) == 0)
|
||||
q->p_flag |= P_WAITED;
|
||||
|
@ -1405,7 +1402,6 @@ svr4_sys_waitsys(td, uap)
|
|||
return svr4_setinfo(q, W_STOPCODE(q->p_xstat),
|
||||
uap->info);
|
||||
}
|
||||
mtx_unlock_spin(&sched_lock);
|
||||
PROC_UNLOCK(q);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue