Test the P_WEXIT flag while already hold the proc lock instead of right

after dropping it.
This commit is contained in:
John Baldwin 2003-04-17 22:21:05 +00:00
parent 7e653dbd3b
commit 538621734a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=113625

View File

@ -291,9 +291,9 @@ cv_wait_sig(struct cv *cvp, struct mtx *mp)
else
rval = ERESTART;
}
PROC_UNLOCK(p);
if (p->p_flag & P_WEXIT)
rval = EINTR;
PROC_UNLOCK(p);
#ifdef KTRACE
if (KTRPOINT(td, KTR_CSW))
@ -454,10 +454,9 @@ cv_timedwait_sig(struct cv *cvp, struct mtx *mp, int timo)
else
rval = ERESTART;
}
PROC_UNLOCK(p);
if (p->p_flag & P_WEXIT)
rval = EINTR;
PROC_UNLOCK(p);
#ifdef KTRACE
if (KTRPOINT(td, KTR_CSW))