feat(libkernel): implement pthread_sigmask #2106
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2106"
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 LeandroLP23 on 2026-10-09T08:41:26Z.
What
PICO-8 for PS5 (PPSA99808 v0.1.2, RafaelNGP/pico8-ps5, GPL-3.0) stops at start-up on this import once its earlier stops resolve (chain in #1578):
JZKw5+Wrnawispthread_sigmask(tools/nid_names.py). It follows FreeBSD libthr's, which callssigprocmaskand returns the error number instead of settingerrno:_sigprocmask, so it shares that function's process-wide mask; FreeBSD keeps one per thread, recorded in TechnicalDebt;howoutsideSIG_BLOCK/SIG_UNBLOCK/SIG_SETMASKwith a set returnsEINVAL, leaves the mask and the old set untouched and does not changeerrno; with a null sethowis ignored, as in FreeBSD'skern_sigprocmask.Tested
Windows 11, MinGW-w64 GCC 15.2.0, Release,
maind70b8998:vhtcIgZG-LkfromlibSceLibcInternal.prx(realpath, #1692).guest_signalschecks blocking throughpthread_sigmaskand reading it back throughsigprocmask, unblocking, the null-set query, andEINVALforhow0 and 4 without touchingerrno.tools/check_conventions.pypasses.Fork CI on this head rebased onto
maind70b8998(with the build workflow from before0ab2a04d, since the new one needs an upstream pull request number): https://github.com/LeandroLP23/AnyPS5/actions/runs/37921135437, all jobs pass (Windows 507/507, Linux 516/516).#1916 (
sigaction) also appends toGuestSignals.cpp; whichever merges second needs a one-line rebase.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-09T08:56:17Z.
Progress report (
8b393b6→97f6541)📈 System libraries: 84.7% (+0.01%, +1 implemented functions)
✅ 1 implemented
pthread_sigmask_nid_postfixImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-09T21:50:49Z.
Closing for now:
pthread_sigmaskisn't a title's next stop onmain. In the PICO-8 (PPSA99808) chain from #1578 it comes afterpthread_setcanceltype,lstat,sigactionand other imports that are still unresolved, which is the same situation as #1692 (realpath), closed for that reason. The change itself looks right: it goes through_sigprocmask,EINVALleaveserrnoalone, and the TechnicalDebt line records the process-wide mask.Feel free to reopen, rebased, once a title stops on this import on
main, with the log line in the description.Imported from boykopovar/AnyPS5. Originally posted by overlordxrz-source on 2026-10-10T01:38:28Z.
@LeandroLP23 @adriadam10
pthread_sigmaskis now a title's next stop onmain. On our Linux rig, built from plainmainat 7a7eb369f359aedbea1f60f148ecbff85b0986c7, both of these stop there:Yamagi Quake II (PPSA99007) gets past
system()(#1859) and now stops atJZKw5+Wrnaw=pthread_sigmask. Ruffle (PPSA68091) reaches the same import on main + #2028 (ModuleList/ModuleInfo). Could #2106 be reopened? We're happy to retest it on the rig against both titles.AI-assisted: yes (the analysis; the rig run and logs are real).
Imported from boykopovar/AnyPS5. Originally posted by overlordxrz-source on 2026-10-10T01:45:30Z.
@adriadam10 quick question while I'm here: I've got a Linux rig running the homebrew catalog against main plus my PRs, and I'm looking to point it at whatever helps most. Is there a specific area (titles, subsystems, retests) where you'd appreciate a hand? Happy to take direction.
Imported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-10T02:24:49Z.
This is now a title's next stop on current
main, so here is the log line the close note asked for, plus a check of this branch.Checked
97f6541bmerged ontomainc963432d, Linux (Ubuntu 24.04, GCC 13) and Windows 11 (MinGW-w64 GCC from WinLibs), Release. The only conflict is inGuestSignals.cpp, wheremainadded thesigactionchecks at the end ofmain(); I kept yourpthread_sigmaskblock right after thesigprocmasklines it builds on, followed bymain's block.guest_signalspasses 5/5 on both (--repeat until-fail:5); no compiler warnings and no CRT assertion dialog on Windows.pthread_sigmaskonmain:main:FAIL: unresolved ELF import JZKw5+Wrnaw (pthread_sigmask) from libkernel.prxapp.elf: symbol lookup error: app.elf: undefined symbol: oxMp8uPqa+U(pthread_set_name_np)FAIL: unresolved ELF import oxMp8uPqa+U (pthread_set_name_np) from libkernel.prxFour more titles reach
pthread_sigmaskonce the PR before it in their chain is in, on both Linux and Windows: VITA5 (PPSA39410), PS5 OpenGL Showcase (PPSA99005) and Homebrew UI Lab (PPSA99050) after_umtx_op(#1482), and ScreenTester5 (PPSA69420) afterpthread_set_name_np(#1872).Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-10T07:19:32Z.
I can't reopen this myself (GitHub only lets a maintainer reopen it). Yamagi Quake II (PPSA99007) now stops on
pthread_sigmaskonmain, as @overlordxrz-source and @babyhuey showed above (FAIL: unresolved ELF import JZKw5+Wrnaw (pthread_sigmask) from libkernel.prx). @adriadam10, if you reopen it, I'll push the rebase right away: it's ready onmain04d06f0d, with theGuestSignals.cppconflict resolved the same way as @babyhuey's check.guest_signalspasses 5/5 and the full non-GPU ctest passes on Windows.Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-10T08:29:58Z.
A second title stops here on Windows: ps5-opengl (PPSA99005 v1.0.1). On
main89a1fb4ewith #1482 (_umtx_op) merged, its next stop isWith the rebase of this PR on top it goes on to
pthread_set_name_np(oxMp8uPqa+U). Radeon 860M, Windows 11 (26300), WinLibs GCC 15.2.0 r7, Release.Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-10T13:26:09Z.
Update: in @babyhuey's new table on #1578 (comment, Linux
main197ffac9and Windowsmaincf8b129e),pthread_sigmaskis now the next stop onmainfor five titles: Ruffle (PPSA68091), Yamagi Quake II (PPSA99007), Prospero Explorer (PPSA99109), Prospero Multi Tools (PPSA99110) and Prospero Vibrate (PPSA99920). The rebase is still ready and still applies cleanly to currentmain.Imported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-10T17:36:51Z.
@LeandroLP23
pthread_sigmaskis now the next stop onmainfor five catalog titles once each title's ownlibc.prxis loaded (required since #2605): Ruffle (PPSA68091), Yamagi Quake II (PPSA99007), Prospero Explorer (PPSA99109), Prospero Multi Tools (PPSA99110) and Prospero Vibrate (PPSA99920). Linuxundefined symbol: JZKw5+Wrnaw, WindowsFAIL: unresolved ELF import JZKw5+Wrnaw (pthread_sigmask) from libkernel.prx(table in #1578). That's what the close note asked for, and the intake check now needs 10 merged PRs, so this can go up again as a new PR.Pull request closed