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
commit 741da9c8bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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();
}
}
}
}