-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
libc: common: add support for iso c11 threads #60759
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
681d636
to
59d811d
Compare
Just looking for some early feedback |
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.
This is looking fine. Is there any reason to depend upon the C library thread.h? Or could Zephyr provide its own version of that file directly?
No reason to explicitly not make it common in Zephyr that I can think of - @keith-packard, were you thinking it might be better to put this into |
It's almost something more common than libc/common -- shouldn't we always use this code, even if the C library provides alternatives? |
853b7e2
to
bea803e
Compare
Fixed another regression in |
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.
lgtm!
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.
One minor note I saw on this review, but honestly it can wait for a future code clean up. Looks good to me!
C library testing is mainly there to support what is necessary to support Zephyr. We do test a variety of libcs currently, which is where YAML comes in handy. However, the main libc testsuite can be overkill for testing some things, and might not be suitable for testing optional features. Create a 'common' subdirectory for common libc tests. Signed-off-by: Christopher Friedt <[email protected]>
This change capitalizes on newly added support for dynamic thread stacks and the existing pthread support to provide an implementation of the ISO C11 `<threads.h>` API. Signed-off-by: Christopher Friedt <[email protected]>
Add tests to verify functionality of the C11 `<threads.h>` API. Signed-off-by: Christopher Friedt <[email protected]>
Add support for C11 mutexes to go with C11 threads. Signed-off-by: Christopher Friedt <[email protected]>
Add tests to cover C11 mutexes Signed-off-by: Christopher Friedt <[email protected]>
Add C11 condition variable support to go with C11 threads and mutexes. Signed-off-by: Christopher Friedt <[email protected]>
Add tests for C11 condition variables. Signed-off-by: Christopher Friedt <[email protected]>
Add C11 thread-specific storage (tss) support to go with C11 threads and mutexes. Signed-off-by: Christopher Friedt <[email protected]>
Add tests for C11 thread-specific storage. Signed-off-by: Christopher Friedt <[email protected]>
Add C11 call_once() support to go with C11 threads and mutexes. Signed-off-by: Christopher Friedt <[email protected]>
Add tests for C11 call_once(). Signed-off-by: Christopher Friedt <[email protected]>
|
@cfriedt note that only admins can override the compliance check failure, so that does not work in this PR favor |
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.
LGTM
Note: Compliance issues are false positives
Capitalize on newly added support for dynamic thread stacks and the existing pthread support to provide an implementation of ISO C11
<threads.h>
.For more information about the ISO C standard, please see
https://www.iso.org/standard/74528.html