Merge pull request #8483 from liamwhite/fire-emblem-three-semaphores

kernel: wait for threads to stop on pause
This commit is contained in:
bunnei 2022-06-22 14:46:33 -07:00 committed by GitHub
commit 3f3f5aa93b
3 changed files with 22 additions and 0 deletions

View file

@ -1078,6 +1078,13 @@ void KernelCore::Suspend(bool suspended) {
for (auto* process : GetProcessList()) {
process->SetActivity(activity);
if (should_suspend) {
// Wait for execution to stop
for (auto* thread : process->GetThreadList()) {
thread->WaitUntilSuspended();
}
}
}
}