feat(libkernel): implement sceKernelSyncOnAddressWait and sceKernelSyncOnAddressWake #349
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/349"
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 DotDebian on 2026-10-02T11:28:50Z.
What
Adds
sceKernelSyncOnAddressWait(Hc4CaR6JBL0) andsceKernelSyncOnAddressWake(q2y-wDIVWZA) to libkernel, in a newSyncOnAddress/src/SyncOnAddress.cpp.sceKernelSyncOnAddressWait(address, expected, timeout, name)returns 0 at once when the 32-bit word ataddressdiffers fromexpected. Otherwise the thread is parked until a wake releases it (0) or the timeout expires (SCE_KERNEL_ERROR_ETIMEDOUT). A null timeout waits without limit.sceKernelSyncOnAddressWake(address, count)releases up tocountthreads parked onaddress, oldest first, and returns 0.The
libc.prxbundled with Astro Bot (PPSA21564 01.007.000, SDK 9) imports both for its once primitive, so the title stopped at load withunresolved ELF import.The argument list comes from the two call sites in that
libc.prx:Wait(address, 1, null, "SceLibcIV2Once")inside a loop that re-reads a 64-bit state, andWake(address, 0x7fffffff)after the state is stored. No caller I have passes a timeout: reading it as a pointer to microseconds, and the return values, follow the other kernel waits and KytyPS5. This is recorded in TechnicalDebt.Not included:
sceKernelSyncOnAddressWait32/sceKernelSyncOnAddressWait64(no title at hand imports them) andsceKernelMapNamedFlexibleMemoryInternal, the third libkernel import thislibc.prxstill lacks.Tested
-DBUILD_TESTING=ON: full build,ctest108/108, including the newguest_sync_on_address(also run 40 times in a row).sceKernelMapNamedFlexibleMemoryInternal: every import resolves, the title reachesmain()and starts its worker threads, then stops onNon-fixed mapping address hints are not implemented. Without this branch it stops at load.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)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-02T13:43:54Z.
Progress report (
a4157bb→ba51236)📈 System libraries: 80.82% (+0.02%, +2 implemented functions)
✅ 2 implemented
sceKernelSyncOnAddressWaitsceKernelSyncOnAddressWake