Files
AnyPS5/core/libs/prx/libkernel
Yunus Shaikh a580845203 fix(libkernel): hand signalled semaphore tokens to queued waiters
sceKernelSignalSema only added to the count and woke the waiters, each
of which then had to take the count itself. A sceKernelPollSema or
sceKernelWaitSema that ran first took the tokens instead, so a thread
that had queued for them could time out or keep waiting. #4899 fixes
the same steal for event flags.

sceKernelSignalSema now hands its tokens to the queued waiters in the
order they queued, passing over one that needs more than is left, and
only what remains stays on the count. sceKernelCancelSema reports the
queued waiters and cancels them. shadPS4's semaphore serves its wait
list the same way when it is signalled.
2026-10-13 12:02:04 -07:00
..