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: implement pthread_attr_getscope() and pthread_attr_setscope() #68450
posix: implement pthread_attr_getscope() and pthread_attr_setscope() #68450
Conversation
17b980b
to
2289548
Compare
I will add tests but would like some reviews on the main part if possible. |
2289548
to
6907d41
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Off-by-one error, otherwise it's close. Just a couple more tests, I think
df8585e
to
bc2e973
Compare
@moonlight83340 - pretty close. Just some minor changes. Please be sure to update |
62390d4
to
661fa06
Compare
661fa06
to
9d98a51
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two small change requests
- make the
contentionscope
bitfield abool
, and - (potentially?) rework the checks in
pthread_attr_setscope()
I found the suggestion a bit more intuitive personally 🤷♂️
9d98a51
to
4af97a5
Compare
Thank you for your suggestion ! I think #68470 could also be a bool ! |
4af97a5
to
7eb97f5
Compare
7eb97f5
to
9a5e232
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can probably use some optimization
9a5e232
to
9a16c0e
Compare
9a16c0e
to
83e5998
Compare
Implement `pthread_attr_setscope()` and `pthread_attr_getscope()` are required as part of _POSIX_THREAD_PRIORITY_SCHEDULING Option Group. signed-off-by: Gaetan Perrot <gaetanperrotpro@gmail.com>
`pthread_attr_setscope()` and `pthread_attr_getscope()` are now implemented, mark it so. signed-off-by: Gaetan Perrot <gaetanperrotpro@gmail.com>
Add tests for `pthread_attr_setscope()` and `pthread_attr_getscope()` signed-off-by: Gaetan Perrot <gaetanperrotpro@gmail.com>
83e5998
to
ab951ea
Compare
@cfriedt I think that PR could use some reviews 😄 |
This is part of the See #51211 (RFC #51211).
pthread_attr_getscope()
andpthread_attr_setscope()
are required as part of _POSIX_THREAD_PRIORITY_SCHEDULING Option Group.For more information, please refer to https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_attr_getscope.html
Fixes #66969
Fixes #66967