From f6cbb14dce48bc4ae112a7d5ae2bbca476d3457e Mon Sep 17 00:00:00 2001 From: bunnei Date: Mon, 17 Jan 2022 16:41:06 -0800 Subject: hle: kernel: KThread: Rename thread_type_for_debugging -> thread_type. - This will be used to ensure that we do not schedule dummy threads. --- src/core/hle/kernel/k_thread.cpp | 2 +- src/core/hle/kernel/k_thread.h | 6 +++--- src/yuzu/debugger/wait_tree.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/core/hle/kernel/k_thread.cpp b/src/core/hle/kernel/k_thread.cpp index 7a5e6fc08..5eb64a381 100644 --- a/src/core/hle/kernel/k_thread.cpp +++ b/src/core/hle/kernel/k_thread.cpp @@ -140,7 +140,7 @@ ResultCode KThread::Initialize(KThreadFunction func, uintptr_t arg, VAddr user_s UNREACHABLE_MSG("KThread::Initialize: Unknown ThreadType {}", static_cast(type)); break; } - thread_type_for_debugging = type; + thread_type = type; // Set the ideal core ID and affinity mask. virtual_ideal_core_id = virt_core; diff --git a/src/core/hle/kernel/k_thread.h b/src/core/hle/kernel/k_thread.h index cc427f6cf..86d4b7c55 100644 --- a/src/core/hle/kernel/k_thread.h +++ b/src/core/hle/kernel/k_thread.h @@ -553,8 +553,8 @@ public: return wait_reason_for_debugging; } - [[nodiscard]] ThreadType GetThreadTypeForDebugging() const { - return thread_type_for_debugging; + [[nodiscard]] ThreadType GetThreadType() const { + return thread_type; } void SetWaitObjectsForDebugging(const std::span& objects) { @@ -753,12 +753,12 @@ private: // For emulation std::shared_ptr host_context{}; bool is_single_core{}; + ThreadType thread_type{}; // For debugging std::vector wait_objects_for_debugging; VAddr mutex_wait_address_for_debugging{}; ThreadWaitReasonForDebugging wait_reason_for_debugging{}; - ThreadType thread_type_for_debugging{}; public: using ConditionVariableThreadTreeType = ConditionVariableThreadTree; diff --git a/src/yuzu/debugger/wait_tree.cpp b/src/yuzu/debugger/wait_tree.cpp index 1f41c46c4..2d1a2d9cb 100644 --- a/src/yuzu/debugger/wait_tree.cpp +++ b/src/yuzu/debugger/wait_tree.cpp @@ -95,7 +95,7 @@ std::vector> WaitTreeItem::MakeThreadItemList( std::size_t row = 0; auto add_threads = [&](const std::vector& threads) { for (std::size_t i = 0; i < threads.size(); ++i) { - if (threads[i]->GetThreadTypeForDebugging() == Kernel::ThreadType::User) { + if (threads[i]->GetThreadType() == Kernel::ThreadType::User) { item_list.push_back(std::make_unique(*threads[i], system)); item_list.back()->row = row; } @@ -153,7 +153,7 @@ QString WaitTreeCallstack::GetText() const { std::vector> WaitTreeCallstack::GetChildren() const { std::vector> list; - if (thread.GetThreadTypeForDebugging() != Kernel::ThreadType::User) { + if (thread.GetThreadType() != Kernel::ThreadType::User) { return list; } -- cgit v1.2.3