diff options
author | Julian Elischer <julian@FreeBSD.org> | 2002-08-21 20:03:55 +0000 |
---|---|---|
committer | Julian Elischer <julian@FreeBSD.org> | 2002-08-21 20:03:55 +0000 |
commit | 721e5910679b6fdf9c168a4a5d97ee6e63df3517 (patch) | |
tree | 2c17d7ffeaacbfc2ab3d4eceb44966289ad75321 /sys/kern/kern_kse.c | |
parent | 69b0a4b6ac12aef5fbb0f2a58b2ef3ef4249e692 (diff) | |
download | src-721e5910679b6fdf9c168a4a5d97ee6e63df3517.tar.gz src-721e5910679b6fdf9c168a4a5d97ee6e63df3517.zip |
Revert some suspension/sleep/signal code from KSE-III
We need to rethink a bit of this and it doesn't matter if
we break the KSE test program for now as long
as non-KSE programs act as expected.
Submitted by: David Xu <bsddiy@yahoo.com>
(this guy's just asking to get hit with a commit bit..)
Notes
Notes:
svn path=/head/; revision=102238
Diffstat (limited to 'sys/kern/kern_kse.c')
-rw-r--r-- | sys/kern/kern_kse.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/kern/kern_kse.c b/sys/kern/kern_kse.c index bb5777a4944d..664dde45405b 100644 --- a/sys/kern/kern_kse.c +++ b/sys/kern/kern_kse.c @@ -731,6 +731,17 @@ thread_suspend_check(int return_instead) * (lent kse's can not go back to userland?) * and can only be lent in STOPPED state. */ + mtx_lock_spin(&sched_lock); + if ((p->p_flag & P_STOPPED_SGNL) && + (p->p_suspcount+1 == p->p_numthreads)) { + mtx_unlock_spin(&sched_lock); + PROC_LOCK(p->p_pptr); + if ((p->p_pptr->p_procsig->ps_flag & + PS_NOCLDSTOP) == 0) { + psignal(p->p_pptr, SIGCHLD); + } + PROC_UNLOCK(p->p_pptr); + } mtx_assert(&Giant, MA_NOTOWNED); mtx_lock_spin(&sched_lock); p->p_suspcount++; |