posix: sched: move sched_yield() to pthread.c #97417
Merged
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.
The
sched_yield()
function was originally included to facilitate the ofPOSIX_REALTIME
andPOSIX_THREADS_EXT
Option Groups in Issue 5.It was then marked as part of the
_POSIX_PROCESS_SCHEDULING
Option in Issue 6, and mentioned to be part of Threads in Issue 7, but then was not clearly marked as part of thePOSIX_THREADS(_BASE)
Option Group until Issue 8.Moving it to
pthread.c
(and making it a function with regular linkage rather than inline) ensures that it will be available with thePOSIX_THREADS
Option Group.For more information, please see
POSIX_THREADS_BASE
in https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_subprofiles.html (Issue 7) andhttps://pubs.opengroup.org/onlinepubs/9799919799/xrat/V4_subprofiles.html (Issue 8).