diff options
| author | Amlal <amlalelmahrouss@icloud.com> | 2024-06-06 10:27:55 +0000 |
|---|---|---|
| committer | Amlal <amlalelmahrouss@icloud.com> | 2024-06-06 10:27:55 +0000 |
| commit | 4e75e05a20ddd0dbca982e8f3bc2ea8043ed3a3f (patch) | |
| tree | 95409c0e32b644578b94a5c230417da684d79dc9 /Kernel/Sources/SMPManager.cxx | |
| parent | f5081a8f9a8537ad5be5d639955cd1d0e68a9e1d (diff) | |
| parent | 9994b8f3f88131f41be1061fb0947177e66dc7b0 (diff) | |
Merged in MHR-23 (pull request #14)
Draft: MHR-23
Diffstat (limited to 'Kernel/Sources/SMPManager.cxx')
| -rw-r--r-- | Kernel/Sources/SMPManager.cxx | 8 |
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); |
