diff options
| author | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-02 13:49:50 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-02 13:49:50 +0100 |
| commit | e559cf01834340d0a4dfcb45f7bdf081e8994032 (patch) | |
| tree | b7d1aa03111f83c0b7b058dca2786a6bd234a7e3 /Private/KernelKit/ThreadLocalStorage.hxx | |
| parent | 05eca8d3061b60eac0a652a4b1e39269a9af79e8 (diff) | |
Kernel: Port toolchain to mingw (PE/COFF)
Signed-off-by: Amlal El Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Private/KernelKit/ThreadLocalStorage.hxx')
| -rw-r--r-- | Private/KernelKit/ThreadLocalStorage.hxx | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/Private/KernelKit/ThreadLocalStorage.hxx b/Private/KernelKit/ThreadLocalStorage.hxx index 910daf31..5db78ca3 100644 --- a/Private/KernelKit/ThreadLocalStorage.hxx +++ b/Private/KernelKit/ThreadLocalStorage.hxx @@ -18,24 +18,27 @@ #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]; /// @brief Thread Information Block for Local Storage. /// 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::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. +struct ThreadInformationBlock final { + 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. }; /// @brief TLS install TIB @@ -44,7 +47,7 @@ extern void rt_install_tib(ThreadInformationBlock *pTib); ///! @brief Cookie Sanity check. HCore::Boolean hcore_tls_check(ThreadInformationBlock *ptr); -#include "ThreadLocalStorage.inl" +#include <KernelKit/ThreadLocalStorage.inl> // last rev 1/29/24 |
