From dea441a5406d5df3b6176521231384ae8c38feff Mon Sep 17 00:00:00 2001 From: jhb Date: Thu, 17 Apr 2003 22:09:08 +0000 Subject: The proc lock is sufficient to test p_state against PRS_ZOMBIE, so don't needlessly lock sched_lock. --- sys/compat/svr4/svr4_misc.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'sys/compat') diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c index 9febd50..81eef66 100644 --- a/sys/compat/svr4/svr4_misc.c +++ b/sys/compat/svr4/svr4_misc.c @@ -1272,10 +1272,8 @@ loop: 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 @@ loop: 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 @@ loop: return svr4_setinfo(q, W_STOPCODE(q->p_xstat), uap->info); } - mtx_unlock_spin(&sched_lock); PROC_UNLOCK(q); } -- cgit v1.1