libkernel/libSceLibcInternal: pthread_setaffinity_np, sys_siglist and sys_nsig are absent (PS5CEMU-HAR after #3787); branch ready #4463
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-12T12:28:37Z.
libkernel lacks
pthread_setaffinity_np(NID5KWrg7-ZqvE) and libSceLibcInternal the data exportssys_siglist(yCdGspbNHZ8) andsys_nsig(ZD+Dp+-LsGg). PS5CEMU-HAR (PPSA99360) stops on the first once #3787 is in: babyhuey's run on #3787 (2026-10-12 10:54Z) givesFAIL: unresolved ELF import 5KWrg7-ZqvE (pthread_setaffinity_np) from libkernel.prxon Windows andundefined symbol: 5KWrg7-ZqvE (pthread_setaffinity_np)on Linux; the two data symbols follow in its registry (predictedFAIL: unresolved ELF import ZD+Dp+-LsGg from libSceLibcInternal.prx).Branch ready:
screamm:feat/libkernel-setaffinity-siglist(two commits onmainffa19840, head827a8c87:feat(libkernel): implement pthread_setaffinity_np,feat(libSceLibcInternal): export sys_siglist and sys_nsig). I cannot open it as a PR under the intake rule while #4081 is open; anyone eligible is welcome to carry it, keeping the commits as they are. #4086 also editsPthread/Posix/Thread.cpp, so a textual conflict is possible.pthread_setaffinity_np(thread, size, set)follows FreeBSD 11.4 libthrthr_affinity.c:41-62overkern_cpuset.c(8c639945): for another thread the lookup comes first (nullEINVAL, unknown or finished threadESRCH, via a newIsLiveGuestThreadhelper), then a size other than the 32-byte guestcpuset_tERANGE(as the kernel and the existingpthread_getaffinity_npdo), null setEFAULT, the mask clipped tosceKernelGetAvailableCpumask()with an empty resultEDEADLK. The affinity is stored on the guest thread object for any thread and not applied to the host thread, the same model asscePthreadSetaffinity; recorded in TechnicalDebt (theEDEADLKoutcome is unverified on console; the live-thread check and the store are not under one lock, like the otherscePthread*calls).sys_siglist(the 32 FreeBSD descriptions fromlib/libc/gen/siglist.c:73-107) andsys_nsig(32,NSIGinsys/signal.h) as plain_nid_postfixdata exports in a newSignalList.cpp, from libSceLibcInternal where the title imports them.tools/progress.pydoes not count data exports.guest_available_cpumaskgains the round trips throughpthread_getaffinity_npfor the caller and another thread, dropped unavailable bits,EDEADLK,ERANGEfor sizes 0/8/31/33/64,EFAULT,EINVAL,ESRCHfor a made-up pointer and a joined thread; newguest_signal_listreadssys_nsigandsys_siglist[SIGINT]and others through the exports.Tested on Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release,
BUILD_TESTING=ON, full build includinglibs: both tests 3/3;ctest -j8 -E "^agc_driver_|^video_out_flip"607/607; withmain'sPthread/Posix/Thread.cppthe extended cpumask test fails;tools/check_conventions.py --base mainandgit diff --checkpass. Not run on Linux; the title needs #3787 first.Written with Claude Code assistance (implementation by a subagent, reviewed and validated in this session).
Imported from boykopovar/AnyPS5. Originally posted by arcwiser on 2026-10-12T12:46:48Z.
I split the offered branch by topic and carried the sys_siglist/sys_nsig commit in #4469 with screamm's authorship preserved. On Windows 11 build 26200 with the supported WinLibs GCC 15.2.0 r7 toolchain, guest_signal_list passes 3/3; conventions and diff checks pass; all 706 built test executables remain registered; and the overlap checker reports no open overlap. The pthread_setaffinity_np commit remains separate and is not part of #4469.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T02:41:03Z.
Closing: fixed on main by #4514 (pthread_setaffinity_np) and #4469 (sys_siglist, sys_nsig). If it still happens on current main, comment here with the title ID and the log line.