kernel: make current thread pointer thread local

This commit is contained in:
Liam 2022-06-16 10:35:52 -04:00
parent 4548e74d3f
commit 83f1ecb73b
13 changed files with 69 additions and 52 deletions

View file

@ -106,6 +106,7 @@ enum class StepState : u32 {
StepPerformed, ///< Thread has stepped, waiting to be scheduled again
};
void SetCurrentThread(KernelCore& kernel, KThread* thread);
[[nodiscard]] KThread* GetCurrentThreadPointer(KernelCore& kernel);
[[nodiscard]] KThread& GetCurrentThread(KernelCore& kernel);
[[nodiscard]] s32 GetCurrentCoreId(KernelCore& kernel);