libkernel: pause, sigwait and sigwaitinfo are absent (Ruffle, PS5MC, XPSemu); throwing exports ready like #3430 #3552
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 screamm on 2026-10-11T13:03:45Z.
libkernel does not export
pause(EDyhWelj7UY),sigwait(mrbHXqK8wkg) orsigwaitinfo(Uq5BGthgbl4). From the relink registry order they are the predicted next stops of Ruffle (PPSA68091,pauseat 0x8F7266), PS5MC (PPSA99420:pause0x3BD80F6/0x3C9E220,sigwait0x3C9E4C7,sigwaitinfo0x3C9E588), XPSemu (PPSA97358: QEMU'ssigwait_compatthread at 0x1101294/0x1101368 and the dummy vCPU at 0xE02AEC) and RetroArch (PPSA99169, an address-table entry); not yet observed in a run.Branch ready:
screamm:feat/libkernel-sigwait(c69adc72, one commit onmaina11c8f7f). I cannot open it as a PR because of the intake check; anyone eligible is welcome to carry it, keeping the commit as is.sigtimedwait, following what #3430 merged for the same reason: the repository's signal model has no per-thread masks, drops blocked signals instead of keeping them pending, runsraise/kill/pthread_killhandlers on the calling thread immediately, and cannot wake a waiting thread, so a real wait cannot be built on it. Messages:sigwaitinfo: waiting for a pending signal not implemented,sigwait: ...,pause: waiting for a delivered signal not implemented; no argument checks before the throw, likesigtimedwait(FreeBSD's only argument error here isEFAULT). Sources for the real semantics are recorded in TechnicalDebt (FreeBSD 11.4pause.c, libthrthr_sig.c,kern_sig.csys_sigwait/sys_sigwaitinfo/kern_sigtimedwait) together with every call site above.guest_sigtimedwaitgains each throw (empty set, nullinfo, SIGINT raised while blocked), the outputs untouched and the blocked mask unchanged.One point for the maintainers: XPSemu's
qemu_signal_initstarts thesigwaitcompat thread at main-loop creation with SIGIO, SIGALRM and SIGBUS, so once its earlier stops are passed this throw is its likely next stop; asigwaitthat blocks forever when its set holds only signals AnyPS5 can never raise would be FreeBSD-equivalent there, but that is a model decision beyond this change.Tested on Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release,
BUILD_TESTING=ON, full build includinglibs:guest_sigtimedwaitandguest_signals3/3;ctest -j8 -E "^agc_driver_|^video_out_flip"533/536, the failures being the knownwindows_exceptions(#3411),guest_kernel_sys(#3491/#3510) andguest_filesystem(#3518); withmain'sSignals.cppthe extended test fails;tools/check_conventions.py --base mainandgit diff --checkpass. Not run on Linux.Written with Claude Code assistance (implementation by a subagent, reviewed and validated in this session).
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T22:11:17Z.
Fixed by #3580: pause, sigwait and sigwaitinfo are exported as throwing stubs, covered by
guest_sigtimedwait.