From 8568193e1bcfed86a8388b1ff44401795692718a Mon Sep 17 00:00:00 2001 From: lizzie Date: Sat, 6 Jun 2026 01:07:09 +0000 Subject: [PATCH] shuffle tls --- 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 6574e902be..d25ac37df4 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp @@ -417,8 +417,7 @@ struct KernelCore::Impl { return is_shutting_down.load(std::memory_order_relaxed); } - KThread* GetCurrentEmuThread() { - auto& t = tls_data; + KThread* GetCurrentEmuThread(ThreadLocalData& t) { return t.current_thread ? t.current_thread : (t.current_thread = GetHostDummyThread(t, nullptr)); } @@ -1125,7 +1124,7 @@ u32 KernelCore::GetCurrentHostThreadID() const { } KThread* KernelCore::GetCurrentEmuThread() const { - return impl->GetCurrentEmuThread(); + return impl->GetCurrentEmuThread(Impl::tls_data); } void KernelCore::SetCurrentEmuThread(KThread* thread) {