From 54618ff03ac48e6e681c0cc5151c4583f080c951 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Mon, 31 May 2021 04:20:59 -0700 Subject: [PATCH] kern: fix enormous whoops --- libmesosphere/source/kern_k_scheduler.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libmesosphere/source/kern_k_scheduler.cpp b/libmesosphere/source/kern_k_scheduler.cpp index 1773a8a0..cce622c9 100644 --- a/libmesosphere/source/kern_k_scheduler.cpp +++ b/libmesosphere/source/kern_k_scheduler.cpp @@ -231,6 +231,10 @@ namespace ams::kern { next_thread = m_idle_thread; } + if (next_thread->GetCurrentCore() != m_core_id) { + next_thread->SetCurrentCore(m_core_id); + } + /* If we're not actually switching thread, there's nothing to do. */ if (next_thread == cur_thread) { return; @@ -263,10 +267,6 @@ namespace ams::kern { MESOSPHERE_KTRACE_THREAD_SWITCH(next_thread); - if (next_thread->GetCurrentCore() != m_core_id) { - next_thread->SetCurrentCore(m_core_id); - } - /* Switch the current process, if we're switching processes. */ if (KProcess *next_process = next_thread->GetOwnerProcess(); next_process != cur_process) { KProcess::Switch(cur_process, next_process);