diff options
| author | 2019-03-29 17:12:02 -0400 | |
|---|---|---|
| committer | 2019-10-15 11:55:09 -0400 | |
| commit | b8b7ebcece955316680a09eb68b891e0acff9fcc (patch) | |
| tree | aa91993f95efbd8d44ef00bd535260cc32feebd1 /src | |
| parent | Correct Supervisor Calls to work with the new scheduler, (diff) | |
| download | yuzu-b8b7ebcece955316680a09eb68b891e0acff9fcc.tar.gz yuzu-b8b7ebcece955316680a09eb68b891e0acff9fcc.tar.xz yuzu-b8b7ebcece955316680a09eb68b891e0acff9fcc.zip | |
Correct compiling errors and addapt to the new interface.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/gdbstub/gdbstub.cpp | 32 | ||||
| -rw-r--r-- | src/core/hle/kernel/process.cpp | 5 | ||||
| -rw-r--r-- | src/yuzu/debugger/wait_tree.cpp | 5 |
3 files changed, 15 insertions, 27 deletions
diff --git a/src/core/gdbstub/gdbstub.cpp b/src/core/gdbstub/gdbstub.cpp index db51d722f..20bb50868 100644 --- a/src/core/gdbstub/gdbstub.cpp +++ b/src/core/gdbstub/gdbstub.cpp | |||
| @@ -202,13 +202,11 @@ void RegisterModule(std::string name, VAddr beg, VAddr end, bool add_elf_ext) { | |||
| 202 | } | 202 | } |
| 203 | 203 | ||
| 204 | static Kernel::Thread* FindThreadById(s64 id) { | 204 | static Kernel::Thread* FindThreadById(s64 id) { |
| 205 | for (u32 core = 0; core < Core::NUM_CPU_CORES; core++) { | 205 | const auto& threads = Core::System::GetInstance().GlobalScheduler().GetThreadList(); |
| 206 | const auto& threads = Core::System::GetInstance().Scheduler(core).GetThreadList(); | 206 | for (auto& thread : threads) { |
| 207 | for (auto& thread : threads) { | 207 | if (thread->GetThreadID() == static_cast<u64>(id)) { |
| 208 | if (thread->GetThreadID() == static_cast<u64>(id)) { | 208 | current_core = thread->GetProcessorID(); |
| 209 | current_core = core; | 209 | return thread.get(); |
| 210 | return thread.get(); | ||
| 211 | } | ||
| 212 | } | 210 | } |
| 213 | } | 211 | } |
| 214 | return nullptr; | 212 | return nullptr; |
| @@ -647,11 +645,9 @@ static void HandleQuery() { | |||
| 647 | SendReply(buffer.c_str()); | 645 | SendReply(buffer.c_str()); |
| 648 | } else if (strncmp(query, "fThreadInfo", strlen("fThreadInfo")) == 0) { | 646 | } else if (strncmp(query, "fThreadInfo", strlen("fThreadInfo")) == 0) { |
| 649 | std::string val = "m"; | 647 | std::string val = "m"; |
| 650 | for (u32 core = 0; core < Core::NUM_CPU_CORES; core++) { | 648 | const auto& threads = Core::System::GetInstance().GlobalScheduler().GetThreadList(); |
| 651 | const auto& threads = Core::System::GetInstance().Scheduler(core).GetThreadList(); | 649 | for (const auto& thread : threads) { |
| 652 | for (const auto& thread : threads) { | 650 | val += fmt::format("{:x},", thread->GetThreadID()); |
| 653 | val += fmt::format("{:x},", thread->GetThreadID()); | ||
| 654 | } | ||
| 655 | } | 651 | } |
| 656 | val.pop_back(); | 652 | val.pop_back(); |
| 657 | SendReply(val.c_str()); | 653 | SendReply(val.c_str()); |
| @@ -661,13 +657,11 @@ static void HandleQuery() { | |||
| 661 | std::string buffer; | 657 | std::string buffer; |
| 662 | buffer += "l<?xml version=\"1.0\"?>"; | 658 | buffer += "l<?xml version=\"1.0\"?>"; |
| 663 | buffer += "<threads>"; | 659 | buffer += "<threads>"; |
| 664 | for (u32 core = 0; core < Core::NUM_CPU_CORES; core++) { | 660 | const auto& threads = Core::System::GetInstance().GlobalScheduler().GetThreadList(); |
| 665 | const auto& threads = Core::System::GetInstance().Scheduler(core).GetThreadList(); | 661 | for (const auto& thread : threads) { |
| 666 | for (const auto& thread : threads) { | 662 | buffer += |
| 667 | buffer += | 663 | fmt::format(R"*(<thread id="{:x}" core="{:d}" name="Thread {:x}"></thread>)*", |
| 668 | fmt::format(R"*(<thread id="{:x}" core="{:d}" name="Thread {:x}"></thread>)*", | 664 | thread->GetThreadID(), thread->GetProcessorID(), thread->GetThreadID()); |
| 669 | thread->GetThreadID(), core, thread->GetThreadID()); | ||
| 670 | } | ||
| 671 | } | 665 | } |
| 672 | buffer += "</threads>"; | 666 | buffer += "</threads>"; |
| 673 | SendReply(buffer.c_str()); | 667 | SendReply(buffer.c_str()); |
diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp index e80a12ac3..12a900bcc 100644 --- a/src/core/hle/kernel/process.cpp +++ b/src/core/hle/kernel/process.cpp | |||
| @@ -213,10 +213,7 @@ void Process::PrepareForTermination() { | |||
| 213 | } | 213 | } |
| 214 | }; | 214 | }; |
| 215 | 215 | ||
| 216 | stop_threads(system.Scheduler(0).GetThreadList()); | 216 | stop_threads(system.GlobalScheduler().GetThreadList()); |
| 217 | stop_threads(system.Scheduler(1).GetThreadList()); | ||
| 218 | stop_threads(system.Scheduler(2).GetThreadList()); | ||
| 219 | stop_threads(system.Scheduler(3).GetThreadList()); | ||
| 220 | 217 | ||
| 221 | FreeTLSRegion(tls_region_address); | 218 | FreeTLSRegion(tls_region_address); |
| 222 | tls_region_address = 0; | 219 | tls_region_address = 0; |
diff --git a/src/yuzu/debugger/wait_tree.cpp b/src/yuzu/debugger/wait_tree.cpp index cd8180f8b..c5b9aa08f 100644 --- a/src/yuzu/debugger/wait_tree.cpp +++ b/src/yuzu/debugger/wait_tree.cpp | |||
| @@ -66,10 +66,7 @@ std::vector<std::unique_ptr<WaitTreeThread>> WaitTreeItem::MakeThreadItemList() | |||
| 66 | }; | 66 | }; |
| 67 | 67 | ||
| 68 | const auto& system = Core::System::GetInstance(); | 68 | const auto& system = Core::System::GetInstance(); |
| 69 | add_threads(system.Scheduler(0).GetThreadList()); | 69 | add_threads(system.GlobalScheduler().GetThreadList()); |
| 70 | add_threads(system.Scheduler(1).GetThreadList()); | ||
| 71 | add_threads(system.Scheduler(2).GetThreadList()); | ||
| 72 | add_threads(system.Scheduler(3).GetThreadList()); | ||
| 73 | 70 | ||
| 74 | return item_list; | 71 | return item_list; |
| 75 | } | 72 | } |