summaryrefslogtreecommitdiffhomepage
path: root/dev/Kernel/KernelKit/ThreadLocalStorage.h
diff options
context:
space:
mode:
Diffstat (limited to 'dev/Kernel/KernelKit/ThreadLocalStorage.h')
-rw-r--r--dev/Kernel/KernelKit/ThreadLocalStorage.h69
1 files changed, 0 insertions, 69 deletions
diff --git a/dev/Kernel/KernelKit/ThreadLocalStorage.h b/dev/Kernel/KernelKit/ThreadLocalStorage.h
deleted file mode 100644
index 573b40b8..00000000
--- a/dev/Kernel/KernelKit/ThreadLocalStorage.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -------------------------------------------
-
- Copyright (C) 2024-2025, Amlal EL Mahrouss, all rights reserved.
-
-------------------------------------------- */
-
-#ifndef KERNELKIT_TLS_H
-#define KERNELKIT_TLS_H
-
-#include <NewKit/Defines.h>
-#include <NewKit/ErrorOr.h>
-
-///! @brief Thread Local Storage for neoskrnl.
-
-#define kCookieMag0Idx 0
-#define kCookieMag1Idx 1
-#define kCookieMag2Idx 2
-
-#define kCookieMag0 'Z'
-#define kCookieMag1 'K'
-#define kCookieMag2 'A'
-
-#define kTLSCookieLen (3U)
-
-struct THREAD_INFORMATION_BLOCK;
-
-/// @brief Thread Information Block.
-/// Located in GS on AMD64, other architectures have their own stuff. (64x0, 32x0, ARM64)
-struct PACKED THREAD_INFORMATION_BLOCK final
-{
- NeOS::Char Cookie[kTLSCookieLen]{0}; //! Thread magic number.
- NeOS::VoidPtr Record{nullptr}; //! Thread information record.
-};
-
-///! @brief Cookie Sanity check.
-NeOS::Boolean tls_check_tib(THREAD_INFORMATION_BLOCK* the_tib);
-
-///! @brief new ptr syscall.
-template <typename T>
-T* tls_new_ptr(void) noexcept;
-
-///! @brief delete ptr syscall.
-template <typename T>
-NeOS::Boolean tls_delete_ptr(T* ptr) noexcept;
-
-//! @brief Delete process pointer.
-//! @param obj The pointer to delete.
-template <typename T>
-inline NeOS::Bool tls_delete_ptr(NeOS::ErrorOr<T> obj) noexcept;
-
-//! @brief Delete process pointer.
-//! @param obj The pointer to delete.
-template <typename T>
-inline NeOS::Bool tls_delete_ptr(NeOS::ErrorOr<T*> obj) noexcept;
-
-template <typename T, typename... Args>
-T* tls_new_class(Args&&... args);
-
-/// @brief TLS install TIB and PIB. (syscall)
-EXTERN_C NeOS::Void rt_install_tib(THREAD_INFORMATION_BLOCK* TIB, THREAD_INFORMATION_BLOCK* PIB);
-
-/// @brief TLS check (syscall)
-EXTERN_C NeOS::Bool tls_check_syscall_impl(NeOS::VoidPtr TIB) noexcept;
-
-#include <KernelKit/ThreadLocalStorage.inl>
-
-// last rev 7/7/24
-
-#endif /* ifndef KERNELKIT_TLS_H */