mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-12-05 09:01:25 +00:00
scePthreadSelf, scePthreadCreate and pthread_self return the address of the thread object. It came from the host heap, which on Windows can lie above 2^40 once the guest arena has reserved the range below 0xfc00000000. Titles keep that address in 40-bit fields: Bloodborne's adaptive mutex stores the owner in the low 40 bits of its lock word, so a thread whose object is above 2^40 never matches itself and waits on its own lock. Allocate PthreadPrivate from the guest heap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
503 B
503 B
libkernel
add Functional
- Thread objects (libkernel) - the objects whose addresses
scePthreadSelf,scePthreadCreateandpthread_selfgive the title come from the guest heap, so they lie in the guest address range below 2^40 that titles assume: CUSA00900 keepsscePthreadSelf()in the low 40 bits of its adaptive mutex word and compares it with the full value. Where the console's libkernel places these objects is not measured.