From 8435451093b193c1a1556a9edadc5663d3372b02 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 18 Dec 2018 22:37:01 -0500 Subject: kernel/thread: Make thread_id a 64-bit value The kernel uses a 64-bit value for the thread ID, so we shouldn't be using a 32-bit value. --- src/core/gdbstub/gdbstub.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/gdbstub/gdbstub.cpp') diff --git a/src/core/gdbstub/gdbstub.cpp b/src/core/gdbstub/gdbstub.cpp index e6b5171ee..a1cad4fcb 100644 --- a/src/core/gdbstub/gdbstub.cpp +++ b/src/core/gdbstub/gdbstub.cpp @@ -201,11 +201,11 @@ void RegisterModule(std::string name, VAddr beg, VAddr end, bool add_elf_ext) { modules.push_back(std::move(module)); } -static Kernel::Thread* FindThreadById(int id) { +static Kernel::Thread* FindThreadById(s64 id) { for (u32 core = 0; core < Core::NUM_CPU_CORES; core++) { const auto& threads = Core::System::GetInstance().Scheduler(core).GetThreadList(); for (auto& thread : threads) { - if (thread->GetThreadID() == static_cast(id)) { + if (thread->GetThreadID() == static_cast(id)) { current_core = core; return thread.get(); } -- cgit v1.2.3