mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-12-27 21:56:42 +00:00
hle: kernel: KThread: Rename thread_type_for_debugging -> thread_type.
- This will be used to ensure that we do not schedule dummy threads.
This commit is contained in:
parent
e781f6e767
commit
f6cbb14dce
|
@ -140,7 +140,7 @@ ResultCode KThread::Initialize(KThreadFunction func, uintptr_t arg, VAddr user_s
|
||||||
UNREACHABLE_MSG("KThread::Initialize: Unknown ThreadType {}", static_cast<u32>(type));
|
UNREACHABLE_MSG("KThread::Initialize: Unknown ThreadType {}", static_cast<u32>(type));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
thread_type_for_debugging = type;
|
thread_type = type;
|
||||||
|
|
||||||
// Set the ideal core ID and affinity mask.
|
// Set the ideal core ID and affinity mask.
|
||||||
virtual_ideal_core_id = virt_core;
|
virtual_ideal_core_id = virt_core;
|
||||||
|
|
|
@ -553,8 +553,8 @@ public:
|
||||||
return wait_reason_for_debugging;
|
return wait_reason_for_debugging;
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] ThreadType GetThreadTypeForDebugging() const {
|
[[nodiscard]] ThreadType GetThreadType() const {
|
||||||
return thread_type_for_debugging;
|
return thread_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetWaitObjectsForDebugging(const std::span<KSynchronizationObject*>& objects) {
|
void SetWaitObjectsForDebugging(const std::span<KSynchronizationObject*>& objects) {
|
||||||
|
@ -753,12 +753,12 @@ private:
|
||||||
// For emulation
|
// For emulation
|
||||||
std::shared_ptr<Common::Fiber> host_context{};
|
std::shared_ptr<Common::Fiber> host_context{};
|
||||||
bool is_single_core{};
|
bool is_single_core{};
|
||||||
|
ThreadType thread_type{};
|
||||||
|
|
||||||
// For debugging
|
// For debugging
|
||||||
std::vector<KSynchronizationObject*> wait_objects_for_debugging;
|
std::vector<KSynchronizationObject*> wait_objects_for_debugging;
|
||||||
VAddr mutex_wait_address_for_debugging{};
|
VAddr mutex_wait_address_for_debugging{};
|
||||||
ThreadWaitReasonForDebugging wait_reason_for_debugging{};
|
ThreadWaitReasonForDebugging wait_reason_for_debugging{};
|
||||||
ThreadType thread_type_for_debugging{};
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
using ConditionVariableThreadTreeType = ConditionVariableThreadTree;
|
using ConditionVariableThreadTreeType = ConditionVariableThreadTree;
|
||||||
|
|
|
@ -95,7 +95,7 @@ std::vector<std::unique_ptr<WaitTreeThread>> WaitTreeItem::MakeThreadItemList(
|
||||||
std::size_t row = 0;
|
std::size_t row = 0;
|
||||||
auto add_threads = [&](const std::vector<Kernel::KThread*>& threads) {
|
auto add_threads = [&](const std::vector<Kernel::KThread*>& threads) {
|
||||||
for (std::size_t i = 0; i < threads.size(); ++i) {
|
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<WaitTreeThread>(*threads[i], system));
|
item_list.push_back(std::make_unique<WaitTreeThread>(*threads[i], system));
|
||||||
item_list.back()->row = row;
|
item_list.back()->row = row;
|
||||||
}
|
}
|
||||||
|
@ -153,7 +153,7 @@ QString WaitTreeCallstack::GetText() const {
|
||||||
std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeCallstack::GetChildren() const {
|
std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeCallstack::GetChildren() const {
|
||||||
std::vector<std::unique_ptr<WaitTreeItem>> list;
|
std::vector<std::unique_ptr<WaitTreeItem>> list;
|
||||||
|
|
||||||
if (thread.GetThreadTypeForDebugging() != Kernel::ThreadType::User) {
|
if (thread.GetThreadType() != Kernel::ThreadType::User) {
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue