diff options
author | Lioncash <mathew1800@gmail.com> | 2018-09-25 22:00:14 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-09-25 22:00:17 +0200 |
commit | a58eefa7e42f156e4a9efead04c6d814286c2f10 (patch) | |
tree | 36cee4834cb7c187a3a136b82d3ed0687b086185 /src/core/hle/kernel/scheduler.cpp | |
parent | Merge pull request #1378 from lioncash/thread (diff) | |
download | yuzu-a58eefa7e42f156e4a9efead04c6d814286c2f10.tar yuzu-a58eefa7e42f156e4a9efead04c6d814286c2f10.tar.gz yuzu-a58eefa7e42f156e4a9efead04c6d814286c2f10.tar.bz2 yuzu-a58eefa7e42f156e4a9efead04c6d814286c2f10.tar.lz yuzu-a58eefa7e42f156e4a9efead04c6d814286c2f10.tar.xz yuzu-a58eefa7e42f156e4a9efead04c6d814286c2f10.tar.zst yuzu-a58eefa7e42f156e4a9efead04c6d814286c2f10.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/scheduler.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/hle/kernel/scheduler.cpp b/src/core/hle/kernel/scheduler.cpp index 69c812f16..9faf903cf 100644 --- a/src/core/hle/kernel/scheduler.cpp +++ b/src/core/hle/kernel/scheduler.cpp @@ -17,7 +17,7 @@ namespace Kernel { std::mutex Scheduler::scheduler_mutex; -Scheduler::Scheduler(Core::ARM_Interface* cpu_core) : cpu_core(cpu_core) {} +Scheduler::Scheduler(Core::ARM_Interface& cpu_core) : cpu_core(cpu_core) {} Scheduler::~Scheduler() { for (auto& thread : thread_list) { @@ -59,9 +59,9 @@ void Scheduler::SwitchContext(Thread* new_thread) { // Save context for previous thread if (previous_thread) { previous_thread->last_running_ticks = CoreTiming::GetTicks(); - cpu_core->SaveContext(previous_thread->context); + cpu_core.SaveContext(previous_thread->context); // Save the TPIDR_EL0 system register in case it was modified. - previous_thread->tpidr_el0 = cpu_core->GetTPIDR_EL0(); + previous_thread->tpidr_el0 = cpu_core.GetTPIDR_EL0(); if (previous_thread->status == ThreadStatus::Running) { // This is only the case when a reschedule is triggered without the current thread @@ -91,10 +91,10 @@ void Scheduler::SwitchContext(Thread* new_thread) { SetCurrentPageTable(&Core::CurrentProcess()->vm_manager.page_table); } - cpu_core->LoadContext(new_thread->context); - cpu_core->SetTlsAddress(new_thread->GetTLSAddress()); - cpu_core->SetTPIDR_EL0(new_thread->GetTPIDR_EL0()); - cpu_core->ClearExclusiveState(); + cpu_core.LoadContext(new_thread->context); + cpu_core.SetTlsAddress(new_thread->GetTLSAddress()); + cpu_core.SetTPIDR_EL0(new_thread->GetTPIDR_EL0()); + cpu_core.ClearExclusiveState(); } else { current_thread = nullptr; // Note: We do not reset the current process and current page table when idling because |