Hello,
To preface:
- HW: nRF9151DK
- SDK/Toolchain: nRF Connect SDK v2.9.0
- I am new to Zephyr (first project)
When using a nRF91 modem, it seems that CONFIG_POSIX_API is used by the samples included with the nRF Connect SDK. Even the Developer Academy courses use the POSIX sockets API. Upon enabling the configuration that notifies you of when experimental Kconfigs are used, I see a bunch in the build log:
warning: Experimental symbol POSIX_ASYNCHRONOUS_IO is enabled. warning: Experimental symbol POSIX_DEVICE_IO is enabled. warning: Experimental symbol POSIX_FD_MGMT is enabled. warning: Experimental symbol POSIX_MULTI_PROCESS is enabled. warning: Experimental symbol POSIX_REALTIME_SIGNALS is enabled. warning: Experimental symbol POSIX_SIGNALS is enabled. warning: Experimental symbol NET_CONNECTION_MANAGER is enabled
After investigating, I see that CONFIG_POSIX_API enables experimental Kconfigs CONFIG_POSIX_FD_MGMT and CONFIG_POSIX_MULTI_PROCESS to name a few. See below for reference:
config POSIX_API bool "POSIX APIs" depends on !NATIVE_APPLICATION select NATIVE_LIBC_INCOMPATIBLE select POSIX_BASE_DEFINITIONS # clock_gettime(), pthread_create(), sem_get(), etc select POSIX_AEP_REALTIME_MINIMAL # CLOCK_MONOTONIC, pthread_attr_setstack(), etc select POSIX_NETWORKING if NETWORKING # inet_ntoa(), socket(), etc imply EVENTFD # eventfd(), eventfd_read(), eventfd_write() imply POSIX_FD_MGMT # open(), close(), read(), write() imply POSIX_MESSAGE_PASSING # mq_open(), etc imply POSIX_MULTI_PROCESS # sleep(), getpid(), etc help This option enables the required POSIX System Interfaces (base definitions), all of PSE51, and some features found in PSE52. Note: in the future, this option may be deprecated in favour of subprofiling options.
Note in the above Kconfig definition:
imply POSIX_FD_MGMT # open(), close(), read(), write()
imply POSIX_MULTI_PROCESS # sleep(), getpid(), etc
Question 1: If CONFIG_POSIX_API is not marked as "experimental", but enables other experimental Kconfigs, then shouldn't CONFIG_POSIX_API be experimental by inheritance?
Question 2: Why does CONFIG_POSIX_API enable POSIX_MULTI_PROCESS if the description for POSIX_MULTI_PROCESS says "Note: Currently Zephyr does not support multiple processes and therefore much of this option group is not implemented and is considered undefined behaviour."
I don't want to use anything that could result in "undefined behavior".
Question 3: Why are the POSIX Kconfigs used for modem libraries in numerous SDK revisions still experimental? They have been around since the nRF9160 from what I understand (please correct me if I am wrong). Seems like whatever Kconfigs needed for cellular communication would have matured and should no longer be experimental.
Thanks!
Derek