diff options
| author | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-06-18 10:39:00 +0200 |
|---|---|---|
| committer | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-06-18 10:43:43 +0200 |
| commit | 596268586bb4c8248a8ec106b8cdea12b9ab926a (patch) | |
| tree | 5fdad88c44af284271ffac1ad3fefcbfe0dac4a6 /Kernel/Sources/ThreadLocalStorage.cxx | |
| parent | 8051ad2bd4af1f226a9751288957ee6af7e787d7 (diff) | |
IMP: TLS syscall, serial write syscall.
FIX: SMP manager writes to stack frame directly, check if we also want
to free the stack.
Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Kernel/Sources/ThreadLocalStorage.cxx')
| -rw-r--r-- | Kernel/Sources/ThreadLocalStorage.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Kernel/Sources/ThreadLocalStorage.cxx b/Kernel/Sources/ThreadLocalStorage.cxx index c292d078..4d6fec14 100644 --- a/Kernel/Sources/ThreadLocalStorage.cxx +++ b/Kernel/Sources/ThreadLocalStorage.cxx @@ -44,14 +44,16 @@ Boolean tls_check_tib(ThreadInformationBlock* tib) * @param stackPtr The call frame. * @return */ -EXTERN_C Void tls_check_syscall_impl(NewOS::HAL::StackFramePtr stackPtr) noexcept +EXTERN_C Void tls_check_syscall_impl(NewOS::VoidPtr TIB) noexcept { - ThreadInformationBlock* tib = (ThreadInformationBlock*)stackPtr->Gs; + if (!TIB) return; + + ThreadInformationBlock* tib = (ThreadInformationBlock*)TIB; if (!tls_check_tib(tib)) { kcout << "newoskrnl: Verification failed, Crashing...\r"; - ProcessScheduler::The().Leak().GetCurrent().Leak().Crash(); + ProcessScheduler::The().Leak().TheCurrent().Leak().Crash(); } kcout << "newoskrnl: Verification succeeded! Keeping on...\r"; |
