-
Notifications
You must be signed in to change notification settings - Fork 7.4k
posix: pthread: implement pthread_atfork() #65641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
posix: pthread: implement pthread_atfork() #65641
Conversation
pthread_atfork() is required by the POSIX_THREADS_BASE Option Group as detailed in Section E.1 of IEEE-1003.1-2017. The POSIX_THREADS_BASE Option Group is required for PSE51, PSE52, PSE53, and PSE54 conformance, and is otherwise mandatory for any POSIX conforming system as per Section A.2.1.3 of IEEE-1003-1.2017. Since Zephyr does not yet support processes and (by extension) fork(), this implementation includes a deviation and should be categorized as producing undefined behaviour. Signed-off-by: Christopher Friedt <[email protected]>
Mark pthread_atfork() as supported in the documentation. This option is a mandatory requirement (i.e. it must be present) even when calling it produces undefined behaviour. That is the case here, and documentation sbould be updated to reflect that. Signed-off-by: Christopher Friedt <[email protected]>
Add a simple existence check that pthread_atfork() has some kind of implementation. The function is mandatory by all conforming POSIX systems. Signed-off-by: Christopher Friedt <[email protected]>
c026c17
to
4ef7845
Compare
A fast forward rebase with git managed to work fine. No merge conflict, and the .rst change made it to the right place in the end. I was impressed |
Please refrain from flagging such trivial-but-not-one-line either changes as trivial, especially if you're the one ending up merging. And trivial requires at least 4 hours in review before being merged anyway :) |
That's ridiculous. This change was trivial. If we're going to be so pedantic should I make 4 separate trivial PRs for each of the 4 lines of (directly related) changes in separate files? |
pthread_atfork() is required by the POSIX_THREADS_BASE Option Group as detailed in Section E.1 of IEEE-1003.1-2017.
The POSIX_THREADS_BASE Option Group is required for PSE51, PSE52, PSE53, and PSE54 conformance, and is otherwise mandatory for any POSIX conforming system as per Section A.2.1.3 of IEEE-1003-1.2017.
Since Zephyr does not yet support processes and (by extension) fork(), this implementation includes a deviation and should be categorized as producing undefined behaviour.
Fixes #59934