AnyPS5/core/libs/prx/libkernel/Semaphore
Lexroid 45a561aea5 fix(libkernel): accept a zero count in sceKernelSignalSema
sceKernelSignalSema threw invalid_argument for a count of 0. Marvel's
Wolverine (PPSA03671) signals with a count computed as min(a, b) - c,
which can be 0, and ignores the result, so the throw ended the title a
few minutes in. A zero count now adds no tokens and returns SCE_OK, as
in shadPS4 and Kyty. A null semaphore and a negative count still throw.

guest_kernel_errors signals 0 on a full and on an empty semaphore and
checks that the count is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 7191d34c4d79622ba71087f0da2b75eb81ad2c23)
2026-10-10 16:12:43 +00:00
..
include feat(libkernel): implement sceKernelCancelSema 2026-10-02 11:57:00 +02:00
src fix(libkernel): accept a zero count in sceKernelSignalSema 2026-10-10 16:12:43 +00:00