feat(libkernel_sys): implement scePthreadMain through pthread_main_np #10794
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10794"
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 slopgobblercobbler on 2026-10-25T01:30:46Z.
What
Implement scePthreadMain in libkernel_sys by forwarding to pthread_main_np_nid_postfix().
PR #9160 introduced IsInitialPthread_nid_no_patch() and implemented pthread_main_np. The corresponding SCE discovery export scePthreadMain was left throwing in Export.Discovery.cpp. Now that #9160 has merged into main, scePthreadMain forwards directly to pthread_main_np_nid_postfix(), and its discovery stub is removed.
The guest test GuestKernelSysThreads.cpp verifies scePthreadMain in both unpatched and patched modes alongside pthread_main_np for both the main thread and a worker thread.
Tested
Checklist
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T02:31:55Z.
Review: COMMENTED
The export forwards to the same initial-thread predicate as
pthread_main_np, and the added cases check main-thread and worker-thread results in patched, unpatched, and worker-first loading paths.git diff --checkand the current-main conventions check pass. Hosted eligibility, intake, labels, and report checks pass; product build/test jobs are skipped by path filters. The author reports compiling the changed sources on Windows 11; I did not run the guest executable locally, so I am leaving this as a comment rather than approving it.