summaryrefslogtreecommitdiffhomepage
path: root/Kernel/Sources/SMPManager.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/Sources/SMPManager.cxx')
-rw-r--r--Kernel/Sources/SMPManager.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/Kernel/Sources/SMPManager.cxx b/Kernel/Sources/SMPManager.cxx
index 90a9d440..29e0fa26 100644
--- a/Kernel/Sources/SMPManager.cxx
+++ b/Kernel/Sources/SMPManager.cxx
@@ -5,7 +5,7 @@
------------------------------------------- */
#include <ArchKit/ArchKit.hpp>
-#include <KernelKit/ProcessScheduler.hpp>
+#include <KernelKit/ProcessScheduler.hxx>
#include <KernelKit/SMPManager.hpp>
///! BUGS: 0
@@ -95,7 +95,6 @@ namespace NewOS
{
/// Keep the arguments, switch the base pointer, stack pointer
/// fs and gs registers.
-
fStack->Rbp = stack->Rbp;
fStack->Rsp = stack->Rsp;
fStack->Fs = stack->Fs;
@@ -103,6 +102,7 @@ namespace NewOS
}
rt_do_context_switch(fStack);
+
return true;
}
@@ -121,7 +121,7 @@ namespace NewOS
SMPManager::~SMPManager() = default;
/// @brief Shared singleton function
- Ref<SMPManager> SMPManager::Shared()
+ Ref<SMPManager> SMPManager::The()
{
static SMPManager manager;
return {manager};
@@ -172,6 +172,8 @@ namespace NewOS
rt_copy_memory(stack, fThreadList[idx].Leak().Leak().fStack,
sizeof(HAL::StackFrame));
+ fThreadList[idx].Leak().Leak().Switch(fThreadList[idx].Leak().Leak().fStack);
+
fThreadList[idx].Leak().Leak().fPID = ProcessHelper::GetCurrentPID();
fThreadList[idx].Leak().Leak().Busy(false);