diff --git a/src/core/kernel/address_arbiter.cpp b/src/core/kernel/address_arbiter.cpp index 276f6e68..ecb0a302 100644 --- a/src/core/kernel/address_arbiter.cpp +++ b/src/core/kernel/address_arbiter.cpp @@ -106,8 +106,9 @@ void Kernel::signalArbiter(u32 waitingAddress, s32 threadCount) { // Wake threads with the highest priority threads being woken up first for (auto index : threadIndices) { Thread& t = threads[index]; - if (t.status == ThreadStatus::WaitArbiter && t.waitingAddress == waitingAddress) { + if ((t.status == ThreadStatus::WaitArbiter || t.status == ThreadStatus::WaitArbiterTimeout) && t.waitingAddress == waitingAddress) { t.status = ThreadStatus::Ready; + t.gprs[0] = Result::Success; // Return that the arbiter was actually signalled and that we didn't timeout count += 1; // Check if we've reached the max number of. If count < 0 then all threads are released. diff --git a/src/core/kernel/threads.cpp b/src/core/kernel/threads.cpp index e905a22f..108f6129 100644 --- a/src/core/kernel/threads.cpp +++ b/src/core/kernel/threads.cpp @@ -327,11 +327,6 @@ int Kernel::wakeupOneThread(u64 waitlist, Handle handle) { } break; - case ThreadStatus::WaitArbiterTimeout: - t.status = ThreadStatus::Ready; - t.gprs[0] = Result::Success; // The thread did not timeout, so write success to r0 - break; - case ThreadStatus::WaitSyncAll: Helpers::panic("WakeupOneThread: Thread on WaitSyncAll"); break; @@ -366,11 +361,6 @@ void Kernel::wakeupAllThreads(u64 waitlist, Handle handle) { } } break; - - case ThreadStatus::WaitArbiterTimeout: - t.status = ThreadStatus::Ready; - t.gprs[0] = Result::Success; // The thread did not timeout, so write success to r0 - break; case ThreadStatus::WaitSyncAll: Helpers::panic("WakeupAllThreads: Thread on WaitSyncAll");