From bece52cd810197e905416fa46a4ed484caa41db5 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Thu, 2 Apr 2020 13:24:39 -0400 Subject: [PATCH] SingleCore: Correct ticks reset to be on preemption. --- src/core/cpu_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() { auto& arm_interface = thread->ArmInterface(); system.EnterDynarmicProfile(); if (!physical_core->IsInterrupted()) { - system.CoreTiming().ResetTicks(); arm_interface.Run(); physical_core = &kernel.CurrentPhysicalCore(); } @@ -285,6 +284,7 @@ void CpuManager::PreemptSingleCore(bool from_running_enviroment) { current_thread->SetPhantomMode(false); } current_core.store((current_core + 1) % Core::Hardware::NUM_CPU_CORES); + system.CoreTiming().ResetTicks(); scheduler.Unload(); auto& next_scheduler = system.Kernel().Scheduler(current_core); Common::Fiber::YieldTo(current_thread->GetHostContext(), next_scheduler.ControlContext());