From e559cf01834340d0a4dfcb45f7bdf081e8994032 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Fri, 2 Feb 2024 13:49:50 +0100 Subject: Kernel: Port toolchain to mingw (PE/COFF) Signed-off-by: Amlal El Mahrouss --- Private/Source/SMPManager.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Private/Source/SMPManager.cxx') diff --git a/Private/Source/SMPManager.cxx b/Private/Source/SMPManager.cxx index 27bf5892..37c2e592 100644 --- a/Private/Source/SMPManager.cxx +++ b/Private/Source/SMPManager.cxx @@ -63,7 +63,9 @@ void HardwareThread::Wake(const bool wakeup) noexcept { bool HardwareThread::Switch(HAL::StackFrame* stack) { if (stack == nullptr) return false; - return rt_do_context_switch(m_Stack, stack) == 0; + m_Stack = stack; + + return rt_do_context_switch(m_Stack) == 0; } ///! @brief Tells if processor is waked up. @@ -110,7 +112,7 @@ bool SMPManager::Switch(HAL::StackFrame* stack) { m_ThreadList[idx].Leak().Leak().Busy(true); - Boolean ret = (rt_do_context_switch(rt_get_current_context(), stack) == 0); + Boolean ret = (rt_do_context_switch(stack) == 0); m_ThreadList[idx].Leak().Leak().Busy(false); -- cgit v1.2.3