From a5c15e643e4a51b918fc463034ca0368ff3765e0 Mon Sep 17 00:00:00 2001 From: adjonesey Date: Thu, 19 Sep 2024 05:15:42 +0100 Subject: [PATCH] Fix Regression #932 (#973) --- src/core/libraries/kernel/threads/semaphore.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/libraries/kernel/threads/semaphore.cpp b/src/core/libraries/kernel/threads/semaphore.cpp index 312f82b6..ff536802 100644 --- a/src/core/libraries/kernel/threads/semaphore.cpp +++ b/src/core/libraries/kernel/threads/semaphore.cpp @@ -32,6 +32,10 @@ public: return ORBIS_KERNEL_ERROR_EBUSY; } + if (timeout && *timeout == 0) { + return SCE_KERNEL_ERROR_ETIMEDOUT; + } + // Create waiting thread object and add it into the list of waiters. WaitingThread waiter{need_count, is_fifo}; const auto it = AddWaiter(&waiter);