The same CPU is assigned to a different process.

refs #423
This commit is contained in:
Tomoki Shirasawa
2015-02-17 18:27:46 +09:00
parent dbe4ec3247
commit 9574a28a5f

View File

@@ -2040,11 +2040,22 @@ redo:
} }
/* No process? Run idle.. */ /* No process? Run idle.. */
if (!next) {
list_for_each_entry_safe(proc, tmp, &(v->runq), sched_list) {
if (proc->ftn->status & (PS_INTERRUPTIBLE |
PS_UNINTERRUPTIBLE |
PS_STOPPED |
PS_TRACED)) {
next = proc;
break;
}
}
if (!next) { if (!next) {
next = &cpu_local_var(idle); next = &cpu_local_var(idle);
v->status = CPU_STATUS_IDLE; v->status = CPU_STATUS_IDLE;
} }
} }
}
if (prev != next) { if (prev != next) {
switch_ctx = 1; switch_ctx = 1;