summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/scheduler.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-03-13 22:49:59 +0100
committerbunnei <bunneidev@gmail.com>2018-03-14 23:42:19 +0100
commit7d6653268f68dea8bc39288e3a27bc499b7b8154 (patch)
tree6330442e1dacc0d850ce09c35dcee7ddd3a2bc9d /src/core/hle/kernel/scheduler.cpp
parentMerge pull request #213 from Hexagon12/dynarmic-default (diff)
downloadyuzu-7d6653268f68dea8bc39288e3a27bc499b7b8154.tar
yuzu-7d6653268f68dea8bc39288e3a27bc499b7b8154.tar.gz
yuzu-7d6653268f68dea8bc39288e3a27bc499b7b8154.tar.bz2
yuzu-7d6653268f68dea8bc39288e3a27bc499b7b8154.tar.lz
yuzu-7d6653268f68dea8bc39288e3a27bc499b7b8154.tar.xz
yuzu-7d6653268f68dea8bc39288e3a27bc499b7b8154.tar.zst
yuzu-7d6653268f68dea8bc39288e3a27bc499b7b8154.zip
Diffstat (limited to 'src/core/hle/kernel/scheduler.cpp')
-rw-r--r--src/core/hle/kernel/scheduler.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/hle/kernel/scheduler.cpp b/src/core/hle/kernel/scheduler.cpp
index 235068b22..921f27efb 100644
--- a/src/core/hle/kernel/scheduler.cpp
+++ b/src/core/hle/kernel/scheduler.cpp
@@ -2,6 +2,7 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
+#include "core/core.h"
#include "core/core_timing.h"
#include "core/hle/kernel/process.h"
#include "core/hle/kernel/scheduler.h"
@@ -67,7 +68,7 @@ void Scheduler::SwitchContext(Thread* new_thread) {
// Cancel any outstanding wakeup events for this thread
new_thread->CancelWakeupTimer();
- auto previous_process = Kernel::g_current_process;
+ auto previous_process = Core::CurrentProcess();
current_thread = new_thread;
@@ -75,8 +76,8 @@ void Scheduler::SwitchContext(Thread* new_thread) {
new_thread->status = THREADSTATUS_RUNNING;
if (previous_process != current_thread->owner_process) {
- Kernel::g_current_process = current_thread->owner_process;
- SetCurrentPageTable(&Kernel::g_current_process->vm_manager.page_table);
+ Core::CurrentProcess() = current_thread->owner_process;
+ SetCurrentPageTable(&Core::CurrentProcess()->vm_manager.page_table);
}
cpu_core->LoadContext(new_thread->context);