AnyPS5/core/libs/prx/libkernel/Time
clem-gb 39c3d0451d fix(libkernel): give each nested TimedWait its own waiter on Windows
A thread had one TimedWait waiter for every wait. When
sceKernelRaiseException reached a thread blocked in a TimedWait
condition, its handler ran as an APC inside that wait, and a wait in
the handler queued the same waiter on a second condition while it was
still linked into the first. The links of the first queue were
overwritten, so waiters behind it were never woken, and a wake of the
outer wait set the shared event and was consumed by the inner wait.

A wait now takes the thread's first waiter that is not in use, and
creates a deeper one for a wait nested inside another.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HeC9bA3n74TzJRYv9AgBE8
2026-10-08 10:47:32 +02:00
..
include fix(libkernel): no allocation while the target is suspended; own the wait count 2026-10-07 21:10:25 +02:00
Time.cpp fix(libkernel): give CLOCK_VIRTUAL, CLOCK_PROF and CLOCK_SECOND their FreeBSD meaning 2026-10-05 10:24:22 +02:00
TimedWait.cpp fix(libkernel): give each nested TimedWait its own waiter on Windows 2026-10-08 10:47:32 +02:00