mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-23 17:13:13 -05:00
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>