schedule: migration free last thread if terminated

This commit is contained in:
Tomoki Shirasawa
2016-03-03 22:44:44 +09:00
parent f1f1ba9c8c
commit 8ebb3a4231

View File

@ -2613,15 +2613,14 @@ redo:
ihk_mc_spinlock_unlock(&(cpu_local_var(runq_lock)),
cpu_local_var(runq_irqstate));
/* Have we migrated to another core meanwhile? */
if (v != get_this_cpu_local_var()) {
dkprintf("migrated, skipping freeing last\n");
goto redo;
}
if ((last != NULL) && (last->status == PS_EXITED)) {
release_thread(last);
}
/* Have we migrated to another core meanwhile? */
if (v != get_this_cpu_local_var()) {
goto redo;
}
}
else {
ihk_mc_spinlock_unlock(&(cpu_local_var(runq_lock)),