Repository navigation
feat(libkernel): implement pthread_getthreadid_np - #3442
Merged
adriadam10 merged 1 commit intoOct 11, 2026
Merged
Conversation
9 tasks done
Collaborator
|
Checked on Linux: build and |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Exports
pthread_getthreadid_np(3eqs37G74-s) from libkernel. It returnsscePthreadGetthreadid(), the calling thread's ID, which #2184 already made match FreeBSD'spthread_getthreadid_np(TID(curthread)inlibthr).PS5MC (PPSA99420) stops at it on
main99c1c26, now thatsetcontext(#3421) is in (catalog build,eboot.binandsce_module/libc.prxunwrapped as #2605 requires; tracked in #1578):app.elf: symbol lookup error: app.elf: undefined symbol: 3eqs37G74-sapp.elf: symbol lookup error: app.elf: undefined symbol: YA0r4LCkfeY(sendfile)FAIL: unresolved ELF import YA0r4LCkfeY (sendfile) from libkernel.prx@AchrafReyani had a branch for the same function and withdrew it in favour of this one on #1578.
Tested
Linux (Ubuntu 24.04, GCC 13) and Windows 11 (MinGW-w64 GCC 15.2 from WinLibs), Release:
guest_thread_selfpasses 5/5 (--repeat until-fail:5) on both, with no warnings inThread.cpporGuestThreadSelf.cpp. The new checks call it on the main thread and on a worker, and require each result to equal that thread's ID fromscePthreadGetthreadidand the worker's to differ from the main thread's.check_conventions.pypasses.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)