make sure to context-switch to idle thread when therad's status is PS_EXITED

refs #1029
This commit is contained in:
Ken Sato
2017-12-25 13:32:42 +09:00
parent 589504dc33
commit cc7be46b7d

View File

@ -3139,7 +3139,8 @@ redo:
} }
} }
if (v->flags & CPU_FLAG_NEED_MIGRATE) { if (v->flags & CPU_FLAG_NEED_MIGRATE ||
prev->status == PS_EXITED) {
next = &cpu_local_var(idle); next = &cpu_local_var(idle);
} else { } else {
/* Pick a new running process or one that has a pending signal */ /* Pick a new running process or one that has a pending signal */