-
Notifications
You must be signed in to change notification settings - Fork 7.2k
lib: posix: remove all default POSIX feature enables #88541
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
base: main
Are you sure you want to change the base?
Conversation
9ce8376
to
da74c74
Compare
This will be good for weeding-out the last remaining users of |
`x509_crt.c` relies on an implementation of `inet_pton`, unless `MBEDTLS_TEST_SW_INET_PTON` is defined. Since `inet_pton` is only defined when `POSIX_NETWORKING` is, define the software fallback if it is not. Signed-off-by: Jordan Yates <[email protected]>
`http_server_core.c` uses `EVENTFD` functions. Signed-off-by: Jordan Yates <[email protected]>
`pthread_setspecific` requires a stack in order to allocate the `struct pthread_key_data` data structure. On 64 bit systems this data structure is 32 bytes, resulting in 160 bytes usage for the default 5 supported threads. Signed-off-by: Jordan Yates <[email protected]>
Make `POSIX_AEP_CHOICE` dependent on `POSIX_API`, which enables removing all the duplicate native library restrictions. Signed-off-by: Jordan Yates <[email protected]>
Only validate `POSIX_RTSIG_MAX` if `POSIX_REALTIME_SIGNALS` is enabled. Signed-off-by: Jordan Yates <[email protected]>
Explicitly enable all required POSIX features, instead of relying on `POSIX_API` to enable defaults. Signed-off-by: Jordan Yates <[email protected]>
51c9cea
to
4ebcb89
Compare
it would be nice to not have any of the POSIX kconfig options show up in the .config when POSIX is not enabled, i.e. when I build hello world (
Why any of this needs to ALWAYS be in the .config if POSIX is not enabled? We do not do this for Bluetooth or for Networking, why do we need to have all those options in the resulting To illustrate this, when you build
which is fine, because you we have enabled BT. when you build hello world:
Thats how it should be We should do something about this. |
I agree with this statement, but as you note this is the current state both on main and in this PR. This PR is trying to limit the number of features that are enabled for users that need some individual piece of the POSIX API, not trying to fix the issue you describe. |
7cad044
to
d6b73ee
Compare
@cfriedt The remaining |
Why do we need to manually enable |
It is not a given that everyone that uses |
Yes, I have heard about this. I have not yet understood why as the
Perhaps we could do |
right, not suggesting this should be done as part of this PR :) btw, there is another issue with how kconfigs of posix are implemented, for example I can now do:
|
Explicitly enable the features required for the tests to pass, rather than relying on `POSIX_API` to enable defaults. Signed-off-by: Jordan Yates <[email protected]>
Explicitly enable all required POSIX features, instead of relying on `POSIX_API` to enable defaults. Signed-off-by: Jordan Yates <[email protected]>
When enabling `POSIX_API`, don't enable any individual features by default. Users can enable the appropriate posix profile through the `POSIX_AEP_CHOICE` choice, or enable required features individually. Signed-off-by: Jordan Yates <[email protected]>
d6b73ee
to
fc238c5
Compare
In #88547, POSIX Option Groups that do not require involvement from the os (e.g. string manipulation functions) are separated from POSIX Option Groups that do require OS involvement. This allows us to very clearly gate most POSIX Option Groups with a Kconfig, removing most of them entirely from e.g. hello world. I chose |
When enabling
POSIX_API
, don't enable any individual features by default. Users can enable the appropriate posix profile through thePOSIX_AEP_CHOICE
choice, or enable required features individually.