schedule(): schedule a sleeping processes if it has pending signals
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user