diff options
author | davidxu <davidxu@FreeBSD.org> | 2003-01-07 05:56:38 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2003-01-07 05:56:38 +0000 |
commit | 87b58b164847b463017f49627b1cfed00cb6719c (patch) | |
tree | f3916382718c15f7722cf68281acdd0f06433378 /sys/kern | |
parent | d8846eabc5bb3c87969ac71d42bfbb161abcd5d6 (diff) | |
download | FreeBSD-src-87b58b164847b463017f49627b1cfed00cb6719c.zip FreeBSD-src-87b58b164847b463017f49627b1cfed00cb6719c.tar.gz |
Check signals for idled threads.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_kse.c | 3 | ||||
-rw-r--r-- | sys/kern/kern_sig.c | 4 | ||||
-rw-r--r-- | sys/kern/kern_thread.c | 3 |
3 files changed, 4 insertions, 6 deletions
diff --git a/sys/kern/kern_kse.c b/sys/kern/kern_kse.c index 7e1982b..ff34488 100644 --- a/sys/kern/kern_kse.c +++ b/sys/kern/kern_kse.c @@ -368,9 +368,8 @@ kse_release(struct thread * td, struct kse_release_args * uap) mtx_lock_spin(&sched_lock); /* Change OURSELF to become an upcall. */ td->td_flags = TDF_UPCALLING; /* BOUND */ - if (!(td->td_kse->ke_flags & KEF_DOUPCALL) && + if (!(td->td_kse->ke_flags & (KEF_DOUPCALL|KEF_ASTPENDING)) && (kg->kg_completed == NULL)) { - /* XXXKSE also look for waiting signals etc. */ /* * The KSE will however be lendable. */ diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 3329b87..77ee34b 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1528,8 +1528,6 @@ psignal(p, sig) else if (TD_IS_IDLE(td)) { thread_suspend_one(td); } - - } if (p->p_suspcount == p->p_numthreads) { mtx_unlock_spin(&sched_lock); @@ -1642,6 +1640,8 @@ tdsignal(struct thread *td, int sig, sig_t action) cv_abort(td); else abortsleep(td); + } else if (TD_IS_IDLE(td)) { + TD_CLR_IDLE(td); } #ifdef SMP else { diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 7e1982b..ff34488 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -368,9 +368,8 @@ kse_release(struct thread * td, struct kse_release_args * uap) mtx_lock_spin(&sched_lock); /* Change OURSELF to become an upcall. */ td->td_flags = TDF_UPCALLING; /* BOUND */ - if (!(td->td_kse->ke_flags & KEF_DOUPCALL) && + if (!(td->td_kse->ke_flags & (KEF_DOUPCALL|KEF_ASTPENDING)) && (kg->kg_completed == NULL)) { - /* XXXKSE also look for waiting signals etc. */ /* * The KSE will however be lendable. */ |