libkernel: pause, sigwait and sigwaitinfo are absent (Ruffle, PS5MC, XPSemu); throwing exports ready like #3430 #3552

Closed
opened 2026-10-11 13:03:45 +00:00 by screamm · 1 comment
screamm commented 2026-10-11 13:03:45 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-11T13:03:45Z.


libkernel does not export pause (EDyhWelj7UY), sigwait (mrbHXqK8wkg) or sigwaitinfo (Uq5BGthgbl4). From the relink registry order they are the predicted next stops of Ruffle (PPSA68091, pause at 0x8F7266), PS5MC (PPSA99420: pause 0x3BD80F6/0x3C9E220, sigwait 0x3C9E4C7, sigwaitinfo 0x3C9E588), XPSemu (PPSA97358: QEMU's sigwait_compat thread 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 on main a11c8f7f). I cannot open it as a PR because of the intake check; anyone eligible is welcome to carry it, keeping the commit as is.

  • The three are throwing exports next to 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, runs raise/kill/pthread_kill handlers 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, like sigtimedwait (FreeBSD's only argument error here is EFAULT). Sources for the real semantics are recorded in TechnicalDebt (FreeBSD 11.4 pause.c, libthr thr_sig.c, kern_sig.c sys_sigwait/sys_sigwaitinfo/kern_sigtimedwait) together with every call site above.
  • guest_sigtimedwait gains each throw (empty set, null info, SIGINT raised while blocked), the outputs untouched and the blocked mask unchanged.

One point for the maintainers: XPSemu's qemu_signal_init starts the sigwait compat thread at main-loop creation with SIGIO, SIGALRM and SIGBUS, so once its earlier stops are passed this throw is its likely next stop; a sigwait that 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 including libs: guest_sigtimedwait and guest_signals 3/3; ctest -j8 -E "^agc_driver_|^video_out_flip" 533/536, the failures being the known windows_exceptions (#3411), guest_kernel_sys (#3491/#3510) and guest_filesystem (#3518); with main's Signals.cpp the extended test fails; tools/check_conventions.py --base main and git diff --check pass. Not run on Linux.

Written with Claude Code assistance (implementation by a subagent, reviewed and validated in this session).

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5801302312 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3552). Originally posted by [screamm](https://github.com/screamm) on 2026-10-11T13:03:45Z. --- libkernel does not export `pause` (`EDyhWelj7UY`), `sigwait` (`mrbHXqK8wkg`) or `sigwaitinfo` (`Uq5BGthgbl4`). From the relink registry order they are the predicted next stops of Ruffle (PPSA68091, `pause` at 0x8F7266), PS5MC (PPSA99420: `pause` 0x3BD80F6/0x3C9E220, `sigwait` 0x3C9E4C7, `sigwaitinfo` 0x3C9E588), XPSemu (PPSA97358: QEMU's `sigwait_compat` thread 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`](https://github.com/screamm/AnyPS5/tree/feat/libkernel-sigwait) (`c69adc72`, one commit on `main` `a11c8f7f`). I cannot open it as a PR because of the intake check; anyone eligible is welcome to carry it, keeping the commit as is. - The three are throwing exports next to `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, runs `raise`/`kill`/`pthread_kill` handlers 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, like `sigtimedwait` (FreeBSD's only argument error here is `EFAULT`). Sources for the real semantics are recorded in TechnicalDebt (FreeBSD 11.4 `pause.c`, libthr `thr_sig.c`, `kern_sig.c` `sys_sigwait`/`sys_sigwaitinfo`/`kern_sigtimedwait`) together with every call site above. - `guest_sigtimedwait` gains each throw (empty set, null `info`, SIGINT raised while blocked), the outputs untouched and the blocked mask unchanged. One point for the maintainers: XPSemu's `qemu_signal_init` starts the `sigwait` compat thread at main-loop creation with SIGIO, SIGALRM and SIGBUS, so once its earlier stops are passed this throw is its likely next stop; a `sigwait` that 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 including `libs`: `guest_sigtimedwait` and `guest_signals` 3/3; `ctest -j8 -E "^agc_driver_|^video_out_flip"` 533/536, the failures being the known `windows_exceptions` (#3411), `guest_kernel_sys` (#3491/#3510) and `guest_filesystem` (#3518); with `main`'s `Signals.cpp` the extended test fails; `tools/check_conventions.py --base main` and `git diff --check` pass. Not run on Linux. Written with Claude Code assistance (implementation by a subagent, reviewed and validated in this session).
adriadam10 commented 2026-10-11 22:11:17 +00:00 (Migrated from github.com)
Author
Contributor

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.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6114418717 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3552#issuecomment-6114418717). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T22:11:17Z. --- Fixed by #3580: pause, sigwait and sigwaitinfo are exported as throwing stubs, covered by `guest_sigtimedwait`.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#3552
No description provided.