-
Notifications
You must be signed in to change notification settings - Fork 7k
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: options: add XSI_REALTIME option group #83303
posix: options: add XSI_REALTIME option group #83303
Conversation
da74584
to
3a0cd37
Compare
57c39c1
to
4271c7a
Compare
c66b962
to
561d6c0
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.
LGTM!
Reviewers might want to take a look workarounds for some weird corner cases
The latter two should be reproducible by undoing the workaround commits. |
561d6c0
to
ec1234e
Compare
|
318ec45
to
28baf38
Compare
287ed0e
to
565214f
Compare
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config XOPEN_STREAMS |
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 will need to be deprecated and renamed XSI_STREAMS
. That's a change for another PR though.
depends on POSIX_SINGLE_PROCESS | ||
depends on POSIX_TIMERS |
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.
I think that XSI_SINGLE_PROCESS should select these other options, similarly to how it's done for XSI_REALTIME. That's a change for another PR though.
9b8b32a
to
1966a6d
Compare
1966a6d
to
be5622f
Compare
For the REALTIME_MINIMAL Application Environment Profile, uncomment the POSIX_MEMLOCK, POSIX_MEMLOCK_RANGE, POSIX_MEMORY_PROTECTION, POSIX_MAPPED_FILES, and POSIX_SHARED_MEMORY_OBJECTS options. These should have been uncommented back when Kconfig options for those features were added, so this can probably be called a Kconfig bug. Signed-off-by: Chris Friedt <[email protected]>
Since XSI is composed of several distinct POSIX Option Groups split Kconfig.xsi into separate files - one for each Option Group. Signed-off-by: Chris Friedt <[email protected]>
be5622f
to
4928880
Compare
@ycsin - should be green shortly (finally 😅) |
if (NOT CONFIG_TC_PROVIDES_POSIX_MEMORY_PROTECTION) | ||
zephyr_library_sources_ifdef(CONFIG_POSIX_MEMORY_PROTECTION mprotect.c) |
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.
if (NOT CONFIG_TC_PROVIDES_POSIX_MEMORY_PROTECTION) | |
zephyr_library_sources_ifdef(CONFIG_POSIX_MEMORY_PROTECTION mprotect.c) | |
if(NOT CONFIG_TC_PROVIDES_POSIX_MEMORY_PROTECTION) | |
zephyr_library_sources_ifdef(CONFIG_POSIX_MEMORY_PROTECTION mprotect.c) |
(for a future PR)
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.
Good catch - we should probably have a cmake linter in GH actions
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.
lib/posix/options/CMakeLists.txt
Outdated
@@ -154,6 +142,15 @@ if (NOT CONFIG_TC_PROVIDES_POSIX_THREADS) | |||
) | |||
endif() | |||
|
|||
if (NOT CONFIG_TC_PROVIDES_XSI_REALTIME) |
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.
if (NOT CONFIG_TC_PROVIDES_XSI_REALTIME) | |
if(NOT CONFIG_TC_PROVIDES_XSI_REALTIME) |
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.
Fixed!
Add a POSIX Option Group called XSI_REALTIME (with Kconfig option CONFIG_XSI_REALTIME). When XSI_REALTIME is selected (or when required POSIX Options are enabled), define _XOPEN_REALTIME to be something other than -1 (_XOPEN_VERSION seemed appropriate). Signed-off-by: Chris Friedt <[email protected]>
Mark the XSI_REALTIME Option Group as supported, such that the _XOPEN_REALTIME feature test macro may be tested. Signed-off-by: Chris Friedt <[email protected]>
4928880
to
16443cb
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.
LGTM
@nordicjm - would you consider giving a second approval? |
Add a POSIX Option Group called
XSI_REALTIME
(with Kconfig optionCONFIG_XSI_REALTIME
).When
XSI_REALTIME
is selected (or when required POSIX Options are enabled), define_XOPEN_REALTIME
to be something other than -1 (_XOPEN_VERSION
seemed appropriate).Doc Preview
Closes #82004
Relates to #79816
Required changes: