AnyPS5/core/libs/prx/libkernel/Pthread/src
Merijn 51b6079b5b fix(libkernel): no allocation while the target is suspended; own the wait count
The APC delivery was allocated after SuspendThread, so a target holding
the allocator lock deadlocked the raising thread; it is now allocated
before the suspend. The wait count a raise checks lived in the target's
thread_local storage and dangled once the thread exited; it is now a
member of PthreadPrivate, which TimedWait counts into through a
thread-local pointer bound when the thread starts, and a raise on a
thread that already finished returns ESRCH. TechnicalDebt gets one line
per unverified choice: Windows only, the FreeBSD ucontext layout, the
signal mask, the YMM upper halves, and delivery to threads outside
TimedWait.

AI-assisted: yes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 21:10:25 +02:00
..
Attr.cpp fix(libkernel): report the thread's priority and affinity from scePthreadAttrGet 2026-10-02 18:03:51 +02:00
Cond.cpp perf(libkernel): resolve initialised mutexes and conditions without the global lock 2026-09-27 11:26:59 -07:00
Mutex.cpp fix(libkernel): return EINVAL for unknown mutex attribute types 2026-10-06 17:04:06 -05:00
Rwlock.cpp feat(libkernel): implement the pthread_rwlock try and timed lock functions 2026-10-04 17:13:36 +02:00
Sem.cpp feat(kernel): implement pthread semaphore lifecycle 2026-09-29 22:13:07 +00:00
Thread.cpp fix(libkernel): no allocation while the target is suspended; own the wait count 2026-10-07 21:10:25 +02:00
Tsd.cpp fix(libkernel): do not expose stale thread-specific values through a reused pthread key 2026-10-05 00:26:20 +00:00