Merge pull request #8388 from liamwhite/simpler-pause

CpuManager: simplify pausing
This commit is contained in:
bunnei
2022-06-13 15:48:03 -07:00
committed by GitHub
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();
}
}
}
}