diff options
-rw-r--r-- | sys/kern/kern_kse.c | 12 | ||||
-rw-r--r-- | sys/kern/kern_thread.c | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/sys/kern/kern_kse.c b/sys/kern/kern_kse.c index f64ae8b..02a62f6 100644 --- a/sys/kern/kern_kse.c +++ b/sys/kern/kern_kse.c @@ -1406,17 +1406,17 @@ thread_single(int force_exit) if (TD_IS_SUSPENDED(td2)) { if (force_exit == SINGLE_EXIT) { thread_unsuspend_one(td2); + } else { + continue; } } - if ( TD_IS_SLEEPING(td2)) { + if (TD_ON_SLEEPQ(td2) && + (td2->td_flags & TDF_SINTR)) { if (td2->td_flags & TDF_CVWAITQ) - cv_waitq_remove(td2); + cv_abort(td2); else - unsleep(td2); - break; + abortsleep(td2); } - if (TD_CAN_RUN(td2)) - setrunqueue(td2); } } /* diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index f64ae8b..02a62f6 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -1406,17 +1406,17 @@ thread_single(int force_exit) if (TD_IS_SUSPENDED(td2)) { if (force_exit == SINGLE_EXIT) { thread_unsuspend_one(td2); + } else { + continue; } } - if ( TD_IS_SLEEPING(td2)) { + if (TD_ON_SLEEPQ(td2) && + (td2->td_flags & TDF_SINTR)) { if (td2->td_flags & TDF_CVWAITQ) - cv_waitq_remove(td2); + cv_abort(td2); else - unsleep(td2); - break; + abortsleep(td2); } - if (TD_CAN_RUN(td2)) - setrunqueue(td2); } } /* |