diff options
| author | 2020-04-02 13:24:39 -0400 | |
|---|---|---|
| committer | 2020-06-27 11:36:06 -0400 | |
| commit | bece52cd810197e905416fa46a4ed484caa41db5 (patch) | |
| tree | 2d02c417645d8c665c82bc37498de1dd851d02f7 /src/core/cpu_manager.cpp | |
| parent | General: Cleanup legacy code. (diff) | |
| download | yuzu-bece52cd810197e905416fa46a4ed484caa41db5.tar.gz yuzu-bece52cd810197e905416fa46a4ed484caa41db5.tar.xz yuzu-bece52cd810197e905416fa46a4ed484caa41db5.zip | |
SingleCore: Correct ticks reset to be on preemption.
Diffstat (limited to 'src/core/cpu_manager.cpp')
| -rw-r--r-- | src/core/cpu_manager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/cpu_manager.cpp b/src/core/cpu_manager.cpp index c0974ee38..b7c2a7832 100644 --- a/src/core/cpu_manager.cpp +++ b/src/core/cpu_manager.cpp | |||
| @@ -227,7 +227,6 @@ void CpuManager::SingleCoreRunGuestLoop() { | |||
| 227 | auto& arm_interface = thread->ArmInterface(); | 227 | auto& arm_interface = thread->ArmInterface(); |
| 228 | system.EnterDynarmicProfile(); | 228 | system.EnterDynarmicProfile(); |
| 229 | if (!physical_core->IsInterrupted()) { | 229 | if (!physical_core->IsInterrupted()) { |
| 230 | system.CoreTiming().ResetTicks(); | ||
| 231 | arm_interface.Run(); | 230 | arm_interface.Run(); |
| 232 | physical_core = &kernel.CurrentPhysicalCore(); | 231 | physical_core = &kernel.CurrentPhysicalCore(); |
| 233 | } | 232 | } |
| @@ -285,6 +284,7 @@ void CpuManager::PreemptSingleCore(bool from_running_enviroment) { | |||
| 285 | current_thread->SetPhantomMode(false); | 284 | current_thread->SetPhantomMode(false); |
| 286 | } | 285 | } |
| 287 | current_core.store((current_core + 1) % Core::Hardware::NUM_CPU_CORES); | 286 | current_core.store((current_core + 1) % Core::Hardware::NUM_CPU_CORES); |
| 287 | system.CoreTiming().ResetTicks(); | ||
| 288 | scheduler.Unload(); | 288 | scheduler.Unload(); |
| 289 | auto& next_scheduler = system.Kernel().Scheduler(current_core); | 289 | auto& next_scheduler = system.Kernel().Scheduler(current_core); |
| 290 | Common::Fiber::YieldTo(current_thread->GetHostContext(), next_scheduler.ControlContext()); | 290 | Common::Fiber::YieldTo(current_thread->GetHostContext(), next_scheduler.ControlContext()); |