feat(libScePosixForWebKit): export pthread_setname_np #8080
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8080"
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 Nixitov on 2026-10-19T20:25:31Z.
What
Exports
pthread_setname_np(cB4rMoKU4UI) fromlibScePosixForWebKit. The module already hadpthread_getname_npthrough libkernel, but no setter in its export set, so a title importing the setter from this module fails to load.The name is stored in libkernel's thread object under its
nameLock, sopthread_getname_npreturns what was set (set/get consistency), and the error values follow libkernel'spthread_rename_np:EINVAL(22) for a null thread or name,ENAMETOOLONG(63) from 32 bytes on,0otherwise, with the name read back truncated to 31 bytes. The Windows thread description and job affinity thatscePthreadRenameapplies are not duplicated here because those helpers are private to libkernel; that and the unverified console error numbers are recorded in the library's technical debt.Tested
New
guest_posix_thread_nametest: sets and reads names back through the pair, covering the empty name, the 31-byte maximum, the 32-byteENAMETOOLONGcase and null arguments. It passes on Windows (MinGW-w64 GCC 15.2, Release);check_conventions.py --base origin/mainpasses.PPSA98512 (FFTARecomp), relinked against
main3d4da7ad0:FAIL: unresolved ELF import cB4rMoKU4UI from libScePosixForWebKit.prx(GetLastError: 127), exits at load.Checklist
main; no other open PR implements the same functionNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-20T03:54:23Z.
Linux run of this head (42d6112f0), since the description covers Windows only. Merged onto
main525e299fc(clean merge). Ubuntu 24.04 container, GCC 13, Release,BUILD_TESTING=ON.guest_posix_thread_namepasses 5 of 5 (--repeat until-fail:5).mainit stops atundefined symbol: cB4rMoKU4UI (pthread_setname_np). With this PR it loads and stops at theDisplayWindowVulkan check, as titles do in a headless run.Imported from boykopovar/AnyPS5. Originally posted by dantdmdarealguy on 2026-10-21T02:11:44Z.
Independent Windows check of head
42d6112f00against its merge base3d4da7ad01, built one after the other in the same build directory, plus currentmain3b5a24c0d. Windows 11 Pro, Intel Core i9-14900K, 128 GB RAM, NVIDIA GeForce RTX 5080 (driver 32.0.16.1742), WinLibs GCC 15.2.0, Ninja, Release,BUILD_TESTING=ON.FFTARecomp (PPSA98512) ps5-v1.0.0, catalog zip, sha256
380a34d5…e2d429d8matching the catalog record.eboot.binandsce_module/libc.prxunwrapped withtools/unwrap_self.py, relinked withrelinker --windows --registry, package asapp0, a fresh run directory per build. 60 s runs, no input.0xC0000139:main3b5a24c0d: the same stop after 3.0 s.terminateornot implementedline.main3b5a24c0dwith this PR merged (together with #8083, #8119 + #8113 and #8255, which touch other libraries): the same, 59.95 FPS at 57 s, exit 0.Tests
guest_posix_thread_namepasses 3 of 3 (--repeat until-fail:3) on the head, and onmain+ this PR.patched_librariespasses on both.libScePosixForWebKit/Export.cppdoesn't link (undefined reference to 'pthread_setname_np_nid_postfix').tools/check_conventions.py --base 3d4da7ad01passes, and the branch merges into currentmain3b5a24c0dwithout conflicts.Not checked: whether FFTARecomp calls
pthread_setname_npbefore its ROM check. The log doesn't name threads, so this run only shows the import resolving.The head's ROM NEEDED screen at 57 s. The base made no window.
Verdict: works on Windows. The load stop is gone on the merge base and on current
main, the title runs to its ROM prompt, and the new test fails without the change.Imported from boykopovar/AnyPS5. Originally posted by rooklz on 2026-10-22T13:00:53Z.
A title that needs this, for the #5239 intake rule: PPSA98512 (FFTARecomp, the Final Fantasy Tactics Advance recompilation in the homebrew catalog,
ps5-v1.0.0) importscB4rMoKU4UIfromlibScePosixForWebKitwith one call site, and onmaina6dcea9279the loader stops on it before anything runs:With the export present (I had written the same forward locally before finding this PR, so I'm not opening it) the title starts, creates its Vulkan device, logs
no cartridge found in /data/FFTARecomp: waiting for oneand records its first draws. Bring-up thread with the details: #9758. Feel free to addUnblocks: PPSA98512 #9758.One thought on the body: libkernel's
pthread_rename_npalready returns thoseerrnovalues and keeps the Windows thread description, so forwarding to it (return pthread_rename_np_nid_postfix(thread, name);) gives the same results without the private helpers you mention.