summaryrefslogtreecommitdiffhomepage
path: root/Kernel/KernelKit/ThreadLocalStorage.inl
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/KernelKit/ThreadLocalStorage.inl')
-rw-r--r--Kernel/KernelKit/ThreadLocalStorage.inl7
1 files changed, 5 insertions, 2 deletions
diff --git a/Kernel/KernelKit/ThreadLocalStorage.inl b/Kernel/KernelKit/ThreadLocalStorage.inl
index c6e61059..319e71b3 100644
--- a/Kernel/KernelKit/ThreadLocalStorage.inl
+++ b/Kernel/KernelKit/ThreadLocalStorage.inl
@@ -25,7 +25,7 @@ inline T* tls_new_ptr(void)
//! @brief TLS delete implementation.
template <typename T>
-inline bool tls_delete_ptr(T* ptr)
+inline Kernel::Bool tls_delete_ptr(T* ptr)
{
if (!ptr)
return false;
@@ -64,8 +64,11 @@ T* tls_new_class(Args&&... args)
/// @param ptr
/// @return
template <typename T>
-inline bool tls_delete_class(T* ptr)
+inline Kernel::Bool tls_delete_class(T* ptr)
{
+ if (!ptr)
+ return false;
+
ptr->~T();
return tls_delete_ptr(ptr);
}