feat(libkernel): implement sceKernelSyncOnAddressWait32 and sceKernelSyncOnAddressWait64 #633
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/633"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by Celegans12 on 2026-10-05T10:14:45Z.
What
This completes #349, which implemented Wait and Wake and left
sceKernelSyncOnAddressWait32andsceKernelSyncOnAddressWait64out; alibc.prxwith the C++20 atomic wait wrappers does not load without them.B2n8aDorSH4) and Wait64 (PZQhiiLXRFs) return 0 at once when the 4- or 8-byte value at the address differs from the comparand, else wait forsceKernelSyncOnAddressWake(0) or the timeout (SCE_KERNEL_ERROR_ETIMEDOUT). A null address, or one not aligned to the value size, throws, as in #349.sceKernelSyncOnAddressWait(unchanged), so one Wake releases waiters of every size, oldest first.EINVALwhere this throws.libc.prx,__std_atomic_wait_direct_32/64(0x112060, 0x1120f0) pass the address, the comparand, their millisecond timeout converted to a pointer to 32-bit microseconds (null for none) and a name string, and ignore the result;__std_atomic_notify_one/all_directcall Wake.Tested
-DBUILD_TESTING=ON, full build,--target libs.ctest --output-on-failure)guest_sync_on_addressgains cases for the Wait32/Wait64 timeout and early return, the Wait64 high-half compare, Wake across all three sizes (count 1, thenINT_MAX) and their invalid addresses; they do not link on main.ctest -R guest_sync_on_address --repeat until-fail:20passes, also withAPS5_COARSE_TIMED_WAITS=1.libc.prximportsB2n8aDorSH4andPZQhiiLXRFsnow resolve; before, loading stopped on them.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-05T15:47:09Z.
Progress report (
e248f40→28b2a08)📈 System libraries: 79.21% (+0.01%, +2 implemented functions)
✅ 2 implemented
sceKernelSyncOnAddressWait32sceKernelSyncOnAddressWait64