diff options
author | Lioncash <mathew1800@gmail.com> | 2018-10-10 06:42:10 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-10-10 08:04:55 +0200 |
commit | 5c0408596f6ccf5d2b171321bac386713b169d5b (patch) | |
tree | 1c5d3e1b178d7252cd3e752d8f2a99017a0ecb6d /src/core/hle/kernel/scheduler.cpp | |
parent | Merge pull request #1461 from lioncash/warn (diff) | |
download | yuzu-5c0408596f6ccf5d2b171321bac386713b169d5b.tar yuzu-5c0408596f6ccf5d2b171321bac386713b169d5b.tar.gz yuzu-5c0408596f6ccf5d2b171321bac386713b169d5b.tar.bz2 yuzu-5c0408596f6ccf5d2b171321bac386713b169d5b.tar.lz yuzu-5c0408596f6ccf5d2b171321bac386713b169d5b.tar.xz yuzu-5c0408596f6ccf5d2b171321bac386713b169d5b.tar.zst yuzu-5c0408596f6ccf5d2b171321bac386713b169d5b.zip |
Diffstat (limited to 'src/core/hle/kernel/scheduler.cpp')
-rw-r--r-- | src/core/hle/kernel/scheduler.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/hle/kernel/scheduler.cpp b/src/core/hle/kernel/scheduler.cpp index cfd6e1bad..1342c597e 100644 --- a/src/core/hle/kernel/scheduler.cpp +++ b/src/core/hle/kernel/scheduler.cpp @@ -9,7 +9,7 @@ #include "common/logging/log.h" #include "core/arm/arm_interface.h" #include "core/core.h" -#include "core/core_timing.h" +#include "core/hle/kernel/kernel.h" #include "core/hle/kernel/process.h" #include "core/hle/kernel/scheduler.h" @@ -78,16 +78,16 @@ void Scheduler::SwitchContext(Thread* new_thread) { // Cancel any outstanding wakeup events for this thread new_thread->CancelWakeupTimer(); - auto previous_process = Core::CurrentProcess(); + auto* const previous_process = Core::CurrentProcess(); current_thread = new_thread; ready_queue.remove(new_thread->GetPriority(), new_thread); new_thread->SetStatus(ThreadStatus::Running); - const auto thread_owner_process = current_thread->GetOwnerProcess(); + auto* const thread_owner_process = current_thread->GetOwnerProcess(); if (previous_process != thread_owner_process) { - Core::CurrentProcess() = thread_owner_process; + Core::System::GetInstance().Kernel().MakeCurrentProcess(thread_owner_process); SetCurrentPageTable(&Core::CurrentProcess()->VMManager().page_table); } |