summaryrefslogtreecommitdiffhomepage
path: root/Private/KernelKit
diff options
context:
space:
mode:
Diffstat (limited to 'Private/KernelKit')
-rw-r--r--Private/KernelKit/ThreadLocalStorage.hxx28
1 files changed, 14 insertions, 14 deletions
diff --git a/Private/KernelKit/ThreadLocalStorage.hxx b/Private/KernelKit/ThreadLocalStorage.hxx
index afd0afb3..8fc8b9dd 100644
--- a/Private/KernelKit/ThreadLocalStorage.hxx
+++ b/Private/KernelKit/ThreadLocalStorage.hxx
@@ -18,14 +18,11 @@
#define kCookieMag1 'C'
#define kCookieMag2 'o'
-template <typename T>
-T* hcore_tls_new_ptr(void);
+template <typename T> T *hcore_tls_new_ptr(void);
-template <typename T>
-bool hcore_tls_delete_ptr(T* ptr);
+template <typename T> bool hcore_tls_delete_ptr(T *ptr);
-template <typename T, typename... Args>
-T* hcore_tls_new_class(Args&&... args);
+template <typename T, typename... Args> T *hcore_tls_new_class(Args &&...args);
typedef char rt_cookie_type[3];
@@ -33,19 +30,22 @@ typedef char rt_cookie_type[3];
/// Located in GS on AMD64, Virtual Address 0x10000 (64x0, 32x0, ARM64)
struct ThreadInformationBlock final
{
- hCore::Char Name[255]; // Module Name
- hCore::UIntPtr StartCode; // Start Address
- hCore::UIntPtr StartData; // Allocation Heap
+ hCore::Char Name[255]; // Module Name
+ hCore::UIntPtr StartCode; // Start Address
+ hCore::UIntPtr StartData; // Allocation Heap
hCore::UIntPtr StartStack; // Stack Pointer.
- hCore::Int32 Arch; // Architecture and/or platform.
- rt_cookie_type Cookie; // Not shown in public header, this is the way we tell something went wrong.
+ hCore::Int32 Arch; // Architecture and/or platform.
+ rt_cookie_type Cookie; // Not shown in public header, this is the way we tell something went wrong.
};
-//! @brief Cookie Sanity check.
-hCore::Boolean hcore_tls_check(ThreadInformationBlock* ptr);
+/// @brief TLS install TIB
+extern void rt_install_tib(ThreadInformationBlock *pTib);
+
+///! @brief Cookie Sanity check.
+hCore::Boolean hcore_tls_check(ThreadInformationBlock *ptr);
#include "ThreadLocalStorage.inl"
-// last rev 1/27/24
+// last rev 1/29/24
#endif /* ifndef _KERNELKIT_TLS_HPP */