From 3b98b6bd0330caa4b28e527980306cdf91286c4c Mon Sep 17 00:00:00 2001 From: wheremyfoodat Date: Mon, 1 May 2023 00:28:41 +0300 Subject: [PATCH] Moar --- src/core/kernel/events.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/kernel/events.cpp b/src/core/kernel/events.cpp index f9b4e573..a287c834 100644 --- a/src/core/kernel/events.cpp +++ b/src/core/kernel/events.cpp @@ -147,6 +147,7 @@ void Kernel::waitSynchronization1() { if (!shouldWaitOnObject(object)) { acquireSyncObject(object, threads[currentThreadIndex]); // Acquire the object since it's ready regs[0] = SVCResult::Success; + rescheduleThreads(); } else { // Timeout is 0, don't bother waiting, instantly timeout if (ns == 0) { @@ -236,6 +237,7 @@ void Kernel::waitSynchronizationN() { regs[0] = SVCResult::Success; regs[1] = firstReadyObjectIndex; // Return index of the acquired object acquireSyncObject(waitObjects[firstReadyObjectIndex].second, t); // Acquire object + rescheduleThreads(); return; }