kern: write thread handle to tls +0x110 on creation

This commit is contained in:
Alula authored and NaGa committed 2026-04-04 21:30:18 +02:00
1 parent db41e33507
commit 688091abc9
4 files changed
+10 -2

No files matched your search

@@ -66,6 +66,9 @@ namespace ams::kern::svc {
/* Add the thread to the handle table. */
R_TRY(process.GetHandleTable().Add(out, thread));
/* Pass the thread handle to the thread local region. */
static_cast<ams::svc::ThreadLocalRegion *>(thread->GetThreadLocalRegionHeapAddress())->thread_handle = *out;
R_SUCCEED();
}