diff options
Diffstat (limited to 'Private/KernelKit/ThreadLocalStorage.hxx')
| -rw-r--r-- | Private/KernelKit/ThreadLocalStorage.hxx | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/Private/KernelKit/ThreadLocalStorage.hxx b/Private/KernelKit/ThreadLocalStorage.hxx index 2fab5026..c6be2c2b 100644 --- a/Private/KernelKit/ThreadLocalStorage.hxx +++ b/Private/KernelKit/ThreadLocalStorage.hxx @@ -26,28 +26,21 @@ T *tls_new_class(Args &&...args); #define kTLSCookieLen 3 -typedef HCore::Char* rt_cookie_type; - -#define kTIBNameLen 256 - /// @brief Thread Information Block for Local Storage. /// Located in GS on AMD64, Virtual Address 0x10000 (64x0, 32x0, ARM64) -struct ThreadInformationBlock final { - HCore::Char Name[kTIBNameLen]; // Module Name +struct PACKED ThreadInformationBlock final { + HCore::Char Cookie[kTLSCookieLen]; HCore::UIntPtr StartCode; // Start Address HCore::UIntPtr StartData; // Allocation Heap HCore::UIntPtr StartStack; // Stack Pointer. - HCore::Int32 Arch; // Architecture and/or platform. - HCore::Int32 ID; // Thread execution ID. - rt_cookie_type Cookie; // Not shown in public header, location of the cookie header is store here, this is the way we tell - // something went wrong. + HCore::Int32 ThreadID; // Thread execution ID. }; /// @brief TLS install TIB EXTERN_C void rt_install_tib(ThreadInformationBlock *pTib, HCore::VoidPtr pPib); ///! @brief Cookie Sanity check. -HCore::Boolean tls_check_tib(ThreadInformationBlock *ptr); +HCore::Boolean tls_check_tib(ThreadInformationBlock* ptr); /// @brief TLS check system call EXTERN_C HCore::Void tls_check_syscall_impl(HCore::HAL::StackFramePtr stackPtr) noexcept; |
