diff options
| author | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-08-01 18:25:14 +0200 |
|---|---|---|
| committer | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-08-01 18:25:14 +0200 |
| commit | 86e291120d124dec7244202b1766901a59dfb2e6 (patch) | |
| tree | 1aa92d3b8a05216941986cf2724ff20ad01b3884 /Kernel/KernelKit/ThreadLocalStorage.hxx | |
| parent | f9579f444b1791d2b73d4d841569728fb203cb29 (diff) | |
[IMP] newoskrnl: Add symbol for cred_construct_token, reworked
ProcessHeap, new SCI.hxx for SCI and SCM.
[IMP] newosldr: Loads the kernel correctly and can launch it, improved
erorr handling.
[META] newoskrnl, newosldr: Improved code and refactors.
Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Kernel/KernelKit/ThreadLocalStorage.hxx')
| -rw-r--r-- | Kernel/KernelKit/ThreadLocalStorage.hxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Kernel/KernelKit/ThreadLocalStorage.hxx b/Kernel/KernelKit/ThreadLocalStorage.hxx index 4a0d7528..9332a47b 100644 --- a/Kernel/KernelKit/ThreadLocalStorage.hxx +++ b/Kernel/KernelKit/ThreadLocalStorage.hxx @@ -17,21 +17,21 @@ #define kTLSCookieLen (3U) -/// @brief Thread Information Block for Local Storage. +struct THREAD_INFORMATION_BLOCK; + +/// @brief Thread Information Block. /// Located in GS on AMD64, other architectures have their own stuff. (64x0, 32x0, ARM64) -struct PACKED ThreadInformationBlock final +struct PACKED THREAD_INFORMATION_BLOCK final { - Kernel::Char Cookie[kTLSCookieLen]; // Process cookie. - Kernel::UIntPtr StartCode; // Start Address - Kernel::UIntPtr StartData; // Allocation Heap - Kernel::UIntPtr StartStack; // Stack Pointer. - Kernel::Int32 ThreadID; // Thread execution ID. + Kernel::Char f_Cookie[kTLSCookieLen]; // Process cookie. + Kernel::UIntPtr f_Code; // Start Address + Kernel::UIntPtr f_Data; // Allocation Heap + Kernel::UIntPtr f_BSS; // Stack Pointer. + Kernel::Int32 f_ID; // Thread execution ID. }; -typedef struct ThreadInformationBlock ProcessInformationBlock; - ///! @brief Cookie Sanity check. -Kernel::Boolean tls_check_tib(ThreadInformationBlock* Ptr); +Kernel::Boolean tls_check_tib(THREAD_INFORMATION_BLOCK* the_tib); ///! @brief new ptr syscall. template <typename T> @@ -45,10 +45,10 @@ template <typename T, typename... Args> T* tls_new_class(Args&&... args); /// @brief TLS install TIB and PIB. (syscall) -EXTERN_C void rt_install_tib(ThreadInformationBlock* TIB, ThreadInformationBlock* PIB); +EXTERN_C void rt_install_tib(THREAD_INFORMATION_BLOCK* TIB, THREAD_INFORMATION_BLOCK* PIB); /// @brief TLS check (syscall) -EXTERN_C Kernel::Void tls_check_syscall_impl(Kernel::VoidPtr TIB) noexcept; +EXTERN_C Kernel::Bool tls_check_syscall_impl(Kernel::VoidPtr TIB) noexcept; #include <KernelKit/ThreadLocalStorage.inl> |
