Check signals for idled threads.

This commit is contained in:
davidxu 2003-01-07 05:56:38 +00:00
parent d8846eabc5
commit 87b58b1648
3 changed files with 4 additions and 6 deletions

View File

@ -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.
*/

View File

@ -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 {

View File

@ -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.
*/