From e0f97f6734ccecea3953ed09d2389de844a403eb Mon Sep 17 00:00:00 2001 From: lizzie Date: Wed, 11 Mar 2026 03:23:25 +0000 Subject: [PATCH] simplify 2 --- src/core/hle/kernel/kernel.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 91c6f8e853..7b423aa5ff 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp @@ -170,9 +170,6 @@ struct KernelCore::Impl { schedulers[core_id].reset(); } - // Next host thead ID to use, 0-3 IDs represent core threads, >3 represent others - next_host_thread_id = Core::Hardware::NUM_CPU_CORES; - // Close kernel objects that were not freed on shutdown { std::scoped_lock lk{registered_in_use_objects_lock}; @@ -355,11 +352,6 @@ struct KernelCore::Impl { application_process->Open(); } - /// Gets the host thread ID for the caller - [[nodiscard]] inline u32 GetHostThreadId() const noexcept { - return tls_data.host_thread_id; - } - // Gets the dummy KThread for the caller, allocating a new one if this is the first time KThread* GetHostDummyThread(KThread* existing_thread) { if (tls_data.thread == nullptr) { @@ -391,7 +383,7 @@ struct KernelCore::Impl { } [[nodiscard]] inline u32 GetCurrentHostThreadID() noexcept { - auto const this_id = GetHostThreadId(); + auto const this_id = tls_data.host_thread_id; if (!is_multicore && single_core_thread_id == this_id) return u32(system.GetCpuManager().CurrentCore()); return this_id; @@ -786,9 +778,6 @@ struct KernelCore::Impl { std::array, Core::Hardware::NUM_CPU_CORES> cores; - // Next host thead ID to use, 0-3 IDs represent core threads, >3 represent others - std::atomic next_host_thread_id{Core::Hardware::NUM_CPU_CORES}; - // Kernel memory management std::optional memory_manager;