CpuManager: simplify pausing

This commit is contained in:
Liam 2022-05-27 20:44:45 -04:00
parent 073714a762
commit af022294dd
3 changed files with 36 additions and 95 deletions

View file

@ -252,6 +252,7 @@ struct KernelCore::Impl {
core_id)
.IsSuccess());
suspend_threads[core_id]->SetName(fmt::format("SuspendThread:{}", core_id));
suspend_threads[core_id]->DisableDispatch();
}
}
@ -1073,9 +1074,6 @@ void KernelCore::Suspend(bool in_suspention) {
impl->suspend_threads[core_id]->SetState(state);
impl->suspend_threads[core_id]->SetWaitReasonForDebugging(
ThreadWaitReasonForDebugging::Suspended);
if (!should_suspend) {
impl->suspend_threads[core_id]->DisableDispatch();
}
}
}
}