AnyPS5/core/libs/prx/libkernel/Semaphore
DotDebian dab1110556 feat(libkernel): implement sceKernelCancelSema
sceKernelCancelSema was a throwing stub. It now releases every thread
blocked in sceKernelWaitSema with SCE_KERNEL_ERROR_ECANCELED without
consuming tokens, sets the count to setCount (the initial count when
setCount is negative) and reports how many threads were waiting. A
setCount above the maximum returns SCE_KERNEL_ERROR_EINVAL and changes
nothing.

Waiters are counted separately from waiterCount, which is only
decremented when a waiter leaves, so two cancels in a row do not report
the same thread twice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 11:57:00 +02:00
..
include feat(libkernel): implement sceKernelCancelSema 2026-10-02 11:57:00 +02:00
src feat(libkernel): implement sceKernelCancelSema 2026-10-02 11:57:00 +02:00