summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_thread.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2002-08-21 20:03:55 +0000
committerjulian <julian@FreeBSD.org>2002-08-21 20:03:55 +0000
commitc99effb6f5993f9742a6d14c8ae3ff8e284d7aac (patch)
tree2c17d7ffeaacbfc2ab3d4eceb44966289ad75321 /sys/kern/kern_thread.c
parentee1c2cc721087a0b3e7657c05643ca6701aa2bfa (diff)
downloadFreeBSD-src-c99effb6f5993f9742a6d14c8ae3ff8e284d7aac.zip
FreeBSD-src-c99effb6f5993f9742a6d14c8ae3ff8e284d7aac.tar.gz
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..)
Diffstat (limited to 'sys/kern/kern_thread.c')
-rw-r--r--sys/kern/kern_thread.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c
index bb5777a..664dde4 100644
--- a/sys/kern/kern_thread.c
+++ b/sys/kern/kern_thread.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++;
OpenPOWER on IntegriCloud