mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2026-02-24 04:33:05 +00:00
kernel: wait for threads to stop on pause
This commit is contained in:
@@ -1079,6 +1079,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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user