schedule(): schedule a sleeping processes if it has pending signals

This commit is contained in:
Balazs Gerofi
2016-07-27 16:15:37 +09:00
parent 57690479bd
commit c484f766fa
4 changed files with 4 additions and 5 deletions

View File

@@ -2593,9 +2593,10 @@ redo:
if (v->flags & CPU_FLAG_NEED_MIGRATE) {
next = &cpu_local_var(idle);
} else {
/* Pick a new running process */
/* Pick a new running process or one that has a pending signal */
list_for_each_entry_safe(thread, tmp, &(v->runq), sched_list) {
if (thread->status == PS_RUNNING) {
if (thread->status == PS_RUNNING ||
(thread->status == PS_INTERRUPTIBLE && hassigpending(thread))) {
next = thread;
break;
}