From c5d96f5dab87d5dcbde7991065bfdb4fa993e8ea Mon Sep 17 00:00:00 2001 From: lizzie Date: Fri, 31 Oct 2025 10:29:45 +0000 Subject: [PATCH] omg you actually need that TLS Signed-off-by: lizzie --- src/core/hle/kernel/kernel.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 90eb69a4a9..1cc060827d 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp @@ -380,9 +380,8 @@ struct KernelCore::Impl { ASSERT(KThread::InitializeDummyThread(thread, nullptr).IsSuccess()); return thread; }}; - - KThread raw_thread{system.Kernel()}; - KThread* thread = existing_thread ? existing_thread : initialize(&raw_thread); + thread_local KThread raw_thread{system.Kernel()}; + thread_local KThread* thread = existing_thread ? existing_thread : initialize(&raw_thread); return thread; }