summaryrefslogtreecommitdiffhomepage
path: root/Private/KernelKit/ThreadLocalStorage.hxx
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-19 10:05:31 +0100
committerAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-19 10:05:31 +0100
commitbaf2afd8cd672dcb9c13d956dfdd73b61dfee558 (patch)
tree0734d2fe6d480e9805121e1c7d5e42f20bf4e8f4 /Private/KernelKit/ThreadLocalStorage.hxx
parent98347089c7e4e2b306d25a0db77e00aa2ea50882 (diff)
unstable, secret: See below.
System.Core: - Add RunTime init function. - Add ReadMe.md Kernel: - Improve TLS code, use Encoder class instead of casting directly. - Refactor process team to include processscheduler.hpp instead. ObjectKit: - Rename Object.hxx to ObjectKit.hxx Builtins/AHCI: - Rename API.hxx to Interface.hxx Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Private/KernelKit/ThreadLocalStorage.hxx')
-rw-r--r--Private/KernelKit/ThreadLocalStorage.hxx15
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;