summaryrefslogtreecommitdiffhomepage
path: root/dev/ZKA/KernelKit/ThreadLocalStorage.inl
diff options
context:
space:
mode:
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));
}