diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-07-07 19:06:14 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-07-07 19:08:07 +0200 |
| commit | d218537836af849ada9b8ad6ef695e5340ee469b (patch) | |
| tree | 9c250e0598b1814877dc6062d68a3ca941fc212e /Kernel/KernelKit | |
| parent | eda81576c1241727085c2f62135cdf5dc118a1d0 (diff) | |
MHR-36: KernelDispatchCall.S: Add ARM64 support.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Kernel/KernelKit')
| -rw-r--r-- | Kernel/KernelKit/ThreadLocalStorage.hxx | 6 | ||||
| -rw-r--r-- | Kernel/KernelKit/ThreadLocalStorage.inl | 7 |
2 files changed, 8 insertions, 5 deletions
diff --git a/Kernel/KernelKit/ThreadLocalStorage.hxx b/Kernel/KernelKit/ThreadLocalStorage.hxx index 50c53fa4..41313381 100644 --- a/Kernel/KernelKit/ThreadLocalStorage.hxx +++ b/Kernel/KernelKit/ThreadLocalStorage.hxx @@ -21,7 +21,7 @@ /// Located in GS on AMD64, other architectures have their own stuff. (64x0, 32x0, ARM64) struct PACKED ThreadInformationBlock final { - Kernel::Char Cookie[kTLSCookieLen]; + Kernel::Char Cookie[kTLSCookieLen]; // Process cookie. Kernel::UIntPtr StartCode; // Start Address Kernel::UIntPtr StartData; // Allocation Heap Kernel::UIntPtr StartStack; // Stack Pointer. @@ -39,7 +39,7 @@ T* tls_new_ptr(void); ///! @brief delete ptr syscall. template <typename T> -bool tls_delete_ptr(T* ptr); +Kernel::Boolean tls_delete_ptr(T* ptr); template <typename T, typename... Args> T* tls_new_class(Args&&... args); @@ -52,6 +52,6 @@ EXTERN_C Kernel::Void tls_check_syscall_impl(Kernel::VoidPtr TIB) noexcept; #include <KernelKit/ThreadLocalStorage.inl> -// last rev 1/29/24 +// last rev 7/7/24 #endif /* ifndef _KERNELKIT_TLS_HPP */ diff --git a/Kernel/KernelKit/ThreadLocalStorage.inl b/Kernel/KernelKit/ThreadLocalStorage.inl index c6e61059..319e71b3 100644 --- a/Kernel/KernelKit/ThreadLocalStorage.inl +++ b/Kernel/KernelKit/ThreadLocalStorage.inl @@ -25,7 +25,7 @@ inline T* tls_new_ptr(void) //! @brief TLS delete implementation. template <typename T> -inline bool tls_delete_ptr(T* ptr) +inline Kernel::Bool tls_delete_ptr(T* ptr) { if (!ptr) return false; @@ -64,8 +64,11 @@ T* tls_new_class(Args&&... args) /// @param ptr /// @return template <typename T> -inline bool tls_delete_class(T* ptr) +inline Kernel::Bool tls_delete_class(T* ptr) { + if (!ptr) + return false; + ptr->~T(); return tls_delete_ptr(ptr); } |
