summaryrefslogtreecommitdiffhomepage
path: root/Private/Source/SMPManager.cxx
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-02 13:49:50 +0100
committerAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-02 13:49:50 +0100
commite559cf01834340d0a4dfcb45f7bdf081e8994032 (patch)
treeb7d1aa03111f83c0b7b058dca2786a6bd234a7e3 /Private/Source/SMPManager.cxx
parent05eca8d3061b60eac0a652a4b1e39269a9af79e8 (diff)
Kernel: Port toolchain to mingw (PE/COFF)
Signed-off-by: Amlal El Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Private/Source/SMPManager.cxx')
-rw-r--r--Private/Source/SMPManager.cxx6
1 files changed, 4 insertions, 2 deletions
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);