summaryrefslogtreecommitdiffhomepage
path: root/dev/ZKA/KernelKit/ThreadLocalStorage.inl
diff options
context:
space:
mode:
authorAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-08-30 20:46:01 +0200
committerAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-08-30 20:46:01 +0200
commit43bac17a2986ac2ea86e9d70c61268fa7e90ca4e (patch)
treed259814b8c388e87bb02860405ff668a92434c44 /dev/ZKA/KernelKit/ThreadLocalStorage.inl
parent8a4f0e988a901e4fce5d32e3d5f9dbdc5f309863 (diff)
Fixed many issues with the kernel, and refactored it.
Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'dev/ZKA/KernelKit/ThreadLocalStorage.inl')
-rw-r--r--dev/ZKA/KernelKit/ThreadLocalStorage.inl9
1 files changed, 4 insertions, 5 deletions
diff --git a/dev/ZKA/KernelKit/ThreadLocalStorage.inl b/dev/ZKA/KernelKit/ThreadLocalStorage.inl
index 56244537..97480bdd 100644
--- a/dev/ZKA/KernelKit/ThreadLocalStorage.inl
+++ b/dev/ZKA/KernelKit/ThreadLocalStorage.inl
@@ -16,9 +16,8 @@ inline T* tls_new_ptr(void) noexcept
{
using namespace Kernel;
- MUST_PASS(ProcessScheduler::The().Leak().TheCurrent());
-
- auto ref_process = ProcessScheduler::The().Leak().TheCurrent();
+ auto ref_process = ProcessScheduler::The().CurrentProcess();
+ MUST_PASS(ref_process);
T* pointer = (T*)ref_process.Leak().New(sizeof(T));
return pointer;
@@ -33,9 +32,9 @@ inline Kernel::Bool tls_delete_ptr(T* ptr) noexcept
using namespace Kernel;
- MUST_PASS(ProcessScheduler::The().Leak().TheCurrent());
+ auto ref_process = ProcessScheduler::The().CurrentProcess();
+ MUST_PASS(ref_process);
- auto ref_process = ProcessScheduler::The().Leak().TheCurrent();
return ref_process.Leak().Delete(ptr, sizeof(T));
}