diff options
Diffstat (limited to 'src/core/core.cpp')
| -rw-r--r-- | src/core/core.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index 954136adb..7723d9782 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp | |||
| @@ -138,7 +138,6 @@ struct System::Impl { | |||
| 138 | 138 | ||
| 139 | kernel.Suspend(false); | 139 | kernel.Suspend(false); |
| 140 | core_timing.SyncPause(false); | 140 | core_timing.SyncPause(false); |
| 141 | cpu_manager.Pause(false); | ||
| 142 | is_paused = false; | 141 | is_paused = false; |
| 143 | 142 | ||
| 144 | return status; | 143 | return status; |
| @@ -150,25 +149,22 @@ struct System::Impl { | |||
| 150 | 149 | ||
| 151 | core_timing.SyncPause(true); | 150 | core_timing.SyncPause(true); |
| 152 | kernel.Suspend(true); | 151 | kernel.Suspend(true); |
| 153 | cpu_manager.Pause(true); | ||
| 154 | is_paused = true; | 152 | is_paused = true; |
| 155 | 153 | ||
| 156 | return status; | 154 | return status; |
| 157 | } | 155 | } |
| 158 | 156 | ||
| 159 | std::unique_lock<std::mutex> StallCPU() { | 157 | std::unique_lock<std::mutex> StallProcesses() { |
| 160 | std::unique_lock<std::mutex> lk(suspend_guard); | 158 | std::unique_lock<std::mutex> lk(suspend_guard); |
| 161 | kernel.Suspend(true); | 159 | kernel.Suspend(true); |
| 162 | core_timing.SyncPause(true); | 160 | core_timing.SyncPause(true); |
| 163 | cpu_manager.Pause(true); | ||
| 164 | return lk; | 161 | return lk; |
| 165 | } | 162 | } |
| 166 | 163 | ||
| 167 | void UnstallCPU() { | 164 | void UnstallProcesses() { |
| 168 | if (!is_paused) { | 165 | if (!is_paused) { |
| 169 | core_timing.SyncPause(false); | 166 | core_timing.SyncPause(false); |
| 170 | kernel.Suspend(false); | 167 | kernel.Suspend(false); |
| 171 | cpu_manager.Pause(false); | ||
| 172 | } | 168 | } |
| 173 | } | 169 | } |
| 174 | 170 | ||
| @@ -334,6 +330,8 @@ struct System::Impl { | |||
| 334 | gpu_core->NotifyShutdown(); | 330 | gpu_core->NotifyShutdown(); |
| 335 | } | 331 | } |
| 336 | 332 | ||
| 333 | kernel.ShutdownCores(); | ||
| 334 | cpu_manager.Shutdown(); | ||
| 337 | debugger.reset(); | 335 | debugger.reset(); |
| 338 | services.reset(); | 336 | services.reset(); |
| 339 | service_manager.reset(); | 337 | service_manager.reset(); |
| @@ -499,12 +497,12 @@ void System::DetachDebugger() { | |||
| 499 | } | 497 | } |
| 500 | } | 498 | } |
| 501 | 499 | ||
| 502 | std::unique_lock<std::mutex> System::StallCPU() { | 500 | std::unique_lock<std::mutex> System::StallProcesses() { |
| 503 | return impl->StallCPU(); | 501 | return impl->StallProcesses(); |
| 504 | } | 502 | } |
| 505 | 503 | ||
| 506 | void System::UnstallCPU() { | 504 | void System::UnstallProcesses() { |
| 507 | impl->UnstallCPU(); | 505 | impl->UnstallProcesses(); |
| 508 | } | 506 | } |
| 509 | 507 | ||
| 510 | void System::InitializeDebugger() { | 508 | void System::InitializeDebugger() { |