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.inl9
1 files changed, 6 insertions, 3 deletions
diff --git a/Kernel/KernelKit/ThreadLocalStorage.inl b/Kernel/KernelKit/ThreadLocalStorage.inl
index c6e61059..0a860336 100644
--- a/Kernel/KernelKit/ThreadLocalStorage.inl
+++ b/Kernel/KernelKit/ThreadLocalStorage.inl
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright Zeta Electronics Corporation
+ Copyright ZKA Technologies
------------------------------------------- */
@@ -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);
}