summaryrefslogtreecommitdiff
path: root/src/core/cpu_manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/cpu_manager.cpp')
-rw-r--r--src/core/cpu_manager.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/cpu_manager.cpp b/src/core/cpu_manager.cpp
index 241971ff3..904aacd97 100644
--- a/src/core/cpu_manager.cpp
+++ b/src/core/cpu_manager.cpp
@@ -79,12 +79,13 @@ void CpuManager::RunGuestThread() {
79 sched.OnThreadStart(); 79 sched.OnThreadStart();
80 } 80 }
81 while (true) { 81 while (true) {
82 auto& physical_core = kernel.CurrentPhysicalCore(); 82 auto* physical_core = &kernel.CurrentPhysicalCore();
83 while (!physical_core.IsInterrupted()) { 83 while (!physical_core->IsInterrupted()) {
84 physical_core.Run(); 84 physical_core->Run();
85 physical_core = &kernel.CurrentPhysicalCore();
85 } 86 }
86 physical_core.ClearExclusive(); 87 physical_core->ClearExclusive();
87 auto& scheduler = physical_core.Scheduler(); 88 auto& scheduler = physical_core->Scheduler();
88 scheduler.TryDoContextSwitch(); 89 scheduler.TryDoContextSwitch();
89 } 90 }
90} 91}