kernel: wait for threads to stop on pause
This commit is contained in:
parent
5b2b15091f
commit
24d7aaf43c
3 changed files with 22 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue