yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

wait_tree: Show all threads on all schedulers.

This commit is contained in:
bunnei 2018-05-05 12:08:16 -04:00
parent 9bf2a428f9
commit 5c0421ebd8
1 changed files with 14 additions and 6 deletions

View File

@ -51,13 +51,21 @@ std::size_t WaitTreeItem::Row() const {
}
std::vector<std::unique_ptr<WaitTreeThread>> WaitTreeItem::MakeThreadItemList() {
const auto& threads = Core::System::GetInstance().Scheduler(0)->GetThreadList();
std::vector<std::unique_ptr<WaitTreeThread>> item_list;
item_list.reserve(threads.size());
for (std::size_t i = 0; i < threads.size(); ++i) {
item_list.push_back(std::make_unique<WaitTreeThread>(*threads[i]));
item_list.back()->row = i;
}
std::size_t row = 0;
auto add_threads = [&](const std::vector<Kernel::SharedPtr<Kernel::Thread>>& threads) {
for (std::size_t i = 0; i < threads.size(); ++i) {
item_list.push_back(std::make_unique<WaitTreeThread>(*threads[i]));
item_list.back()->row = row;
++row;
}
};
add_threads(Core::System::GetInstance().Scheduler(0)->GetThreadList());
add_threads(Core::System::GetInstance().Scheduler(1)->GetThreadList());
add_threads(Core::System::GetInstance().Scheduler(2)->GetThreadList());
add_threads(Core::System::GetInstance().Scheduler(3)->GetThreadList());
return item_list;
}