aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/k_scheduler.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-01-21 13:00:16 -0800
committerbunnei <bunneidev@gmail.com>2021-01-28 21:42:26 -0800
commitcf3a05cf8c88c0625f4677fbfd4d9b8745de0ebe (patch)
tree92a498827c4de7dd372731eff83c66aa3f57f060 /src/core/hle/kernel/k_scheduler.cpp
parent0b307a12f3043fb794bb3e94a0452c62662f27c0 (diff)
hle: kernel: Allocate a dummy KThread for each host thread, and use it for scheduling.
Diffstat (limited to 'src/core/hle/kernel/k_scheduler.cpp')
-rw-r--r--src/core/hle/kernel/k_scheduler.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/kernel/k_scheduler.cpp b/src/core/hle/kernel/k_scheduler.cpp
index fbdc061df8..bb5f43b535 100644
--- a/src/core/hle/kernel/k_scheduler.cpp
+++ b/src/core/hle/kernel/k_scheduler.cpp
@@ -623,7 +623,7 @@ KThread* KScheduler::GetCurrentThread() const {
if (auto result = current_thread.load(); result) {
return result;
}
- return idle_thread.get();
+ return idle_thread;
}
u64 KScheduler::GetLastContextSwitchTicks() const {
@@ -708,7 +708,7 @@ void KScheduler::ScheduleImpl() {
// We never want to schedule a null thread, so use the idle thread if we don't have a next.
if (next_thread == nullptr) {
- next_thread = idle_thread.get();
+ next_thread = idle_thread;
}
// If we're not actually switching thread, there's nothing to do.
@@ -803,7 +803,7 @@ void KScheduler::Initialize() {
auto thread_res = KThread::Create(system, ThreadType::Main, name, 0,
KThread::IdleThreadPriority, 0, static_cast<u32>(core_id), 0,
nullptr, std::move(init_func), init_func_parameter);
- idle_thread = thread_res.Unwrap();
+ idle_thread = thread_res.Unwrap().get();
}
KScopedSchedulerLock::KScopedSchedulerLock(KernelCore& kernel)