diff options
| author | 2018-10-10 10:34:20 -0400 | |
|---|---|---|
| committer | 2018-10-10 10:34:20 -0400 | |
| commit | 68b3d8b7a974780ff1eef3fe5764b2dd9cdb4d32 (patch) | |
| tree | 1c5d3e1b178d7252cd3e752d8f2a99017a0ecb6d /src/core/hle/kernel/scheduler.cpp | |
| parent | Merge pull request #1461 from lioncash/warn (diff) | |
| parent | kernel/thread: Use a regular pointer for the owner/current process (diff) | |
| download | yuzu-68b3d8b7a974780ff1eef3fe5764b2dd9cdb4d32.tar.gz yuzu-68b3d8b7a974780ff1eef3fe5764b2dd9cdb4d32.tar.xz yuzu-68b3d8b7a974780ff1eef3fe5764b2dd9cdb4d32.zip | |
Merge pull request #1469 from lioncash/ptr
kernel/thread: Use a regular pointer for the owner/current process
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 @@ | |||
| 9 | #include "common/logging/log.h" | 9 | #include "common/logging/log.h" |
| 10 | #include "core/arm/arm_interface.h" | 10 | #include "core/arm/arm_interface.h" |
| 11 | #include "core/core.h" | 11 | #include "core/core.h" |
| 12 | #include "core/core_timing.h" | 12 | #include "core/hle/kernel/kernel.h" |
| 13 | #include "core/hle/kernel/process.h" | 13 | #include "core/hle/kernel/process.h" |
| 14 | #include "core/hle/kernel/scheduler.h" | 14 | #include "core/hle/kernel/scheduler.h" |
| 15 | 15 | ||
| @@ -78,16 +78,16 @@ void Scheduler::SwitchContext(Thread* new_thread) { | |||
| 78 | // Cancel any outstanding wakeup events for this thread | 78 | // Cancel any outstanding wakeup events for this thread |
| 79 | new_thread->CancelWakeupTimer(); | 79 | new_thread->CancelWakeupTimer(); |
| 80 | 80 | ||
| 81 | auto previous_process = Core::CurrentProcess(); | 81 | auto* const previous_process = Core::CurrentProcess(); |
| 82 | 82 | ||
| 83 | current_thread = new_thread; | 83 | current_thread = new_thread; |
| 84 | 84 | ||
| 85 | ready_queue.remove(new_thread->GetPriority(), new_thread); | 85 | ready_queue.remove(new_thread->GetPriority(), new_thread); |
| 86 | new_thread->SetStatus(ThreadStatus::Running); | 86 | new_thread->SetStatus(ThreadStatus::Running); |
| 87 | 87 | ||
| 88 | const auto thread_owner_process = current_thread->GetOwnerProcess(); | 88 | auto* const thread_owner_process = current_thread->GetOwnerProcess(); |
| 89 | if (previous_process != thread_owner_process) { | 89 | if (previous_process != thread_owner_process) { |
| 90 | Core::CurrentProcess() = thread_owner_process; | 90 | Core::System::GetInstance().Kernel().MakeCurrentProcess(thread_owner_process); |
| 91 | SetCurrentPageTable(&Core::CurrentProcess()->VMManager().page_table); | 91 | SetCurrentPageTable(&Core::CurrentProcess()->VMManager().page_table); |
| 92 | } | 92 | } |
| 93 | 93 | ||