-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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 subsys: Need more fine-grained enable options #12965
Comments
@nashif, @galak, @ramakrishnapallala, @nniranjhana: FYI This comes from experience in porting https://github.com/open62541/open62541 to Zephyr (which is a Linaro project to try and see how far we're along the "take an existing 3rd-party lib and just run it with Zephyr" approach). cc'ing you so there was a place to discuss details if needed, and these changes didn't come as a surprise (because for me some recent changes related to POSIX subsys were a surprise). |
Basic requirements: 1. It should be possible to control whether include/posix/ is added to include search path or not. 2. It should be possible to use individual parts of POSIX API, without bringing in everything else. For example, if user is interested in just sleep(), should be possible to enable just that. 3. Keep existing CONFIG_POSIX_API as "master switch", which enables "a lot of POSIX APIs". Fixes: zephyrproject-rtos#12965 Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Basic requirements: 1. It should be possible to control whether include/posix/ is added to include search path or not. 2. It should be possible to use individual parts of POSIX API, without bringing in everything else. For example, if user is interested in just sleep(), should be possible to enable just that. 3. Keep existing CONFIG_POSIX_API as "master switch", which enables "a lot of POSIX APIs". Fixes: zephyrproject-rtos#12965 Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Allow to enable individual POSIX components, like Pthreads. CONFIG_POSIX_API now just enables all of individual POSIX components, and sets up environment suitable to easily port POSIX applications to Zephyr. Fixes: zephyrproject-rtos#12965 Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Allow to enable individual POSIX components, like Pthreads. CONFIG_POSIX_API now just enables all of individual POSIX components, and sets up environment suitable to easily port POSIX applications to Zephyr. Fixes: zephyrproject-rtos#12965 Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Allow to enable individual POSIX components, like Pthreads. CONFIG_POSIX_API now just enables all of individual POSIX components, and sets up environment suitable to easily port POSIX applications to Zephyr. Fixes: #12965 Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Currently, we have a "master switch" of CONFIG_POSIX_API which enables a lot of POSIX subsys functionality at once, and just a few sub-options to control some areas (Pthreads, etc.).
One of things which CONFIG_POSIX_API does it automatically adds headers under includes/posix/ to the include paths. Unfortunately, how they're implemented now is very fragile, and making any step further than the current tests (we don't even have POSIX samples!) go, leads to header/symbold conflicts and build errors. That's a separate matter (I'll post another ticket on that), and resolving that would likely take more time.
What I would like to do with scope of this ticket is:
select
all the finer-grained options.The purpose of these changes is to allow to gradual porting of applications. E.g., if an app needs just clock_gettime(), I should be able to pull in just that, instead of the whole POSIX subsystem, which is, again, likely will lead to header/symbol conflicts.
The text was updated successfully, but these errors were encountered: