Skip to content
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: standardize kconfig options #73047

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
19d72fb
tests: posix: headers: remove tests for varying features
May 21, 2024
eb741ab
tests: posix: headers: check some structs only when posix_api=y
May 21, 2024
4f746c3
posix: sysconf: correct typo on _SC_MAPPED_FILE(S)
May 20, 2024
dd491e4
tests: posix: headers: enable checks for sysconf() constants
May 21, 2024
d230b2a
tests: posix: headers: enable checks for confstr() constants
May 21, 2024
7262d5d
posix: unistd: move posix features to separate header file
May 20, 2024
760307e
posix: features: leave feature test macros undefined if unimpl
May 20, 2024
f88fa00
posix: sysconf: define z sysconf macros with COND_CODE_1
May 20, 2024
4f71c4c
posix: add Kconfig.deprecated
May 20, 2024
ab5665a
posix: signals: deprecate CONFIG_POSIX_LIMITS_RTSIG_MAX
May 21, 2024
d8c658d
posix: timers: deprecate CONFIG_POSIX_CLOCK and TIMER
May 20, 2024
0220d93
posix: fd_mgmt: add fd_mgmt option group
May 22, 2024
557dc39
posix: deprecate POSIX_MAX_FDS and add POSIX_DEVICE_IO
May 22, 2024
5179636
posix: deprecate PTHREAD_BARRIER for POSIX_BARRIERS
May 22, 2024
2ed489f
posix: deprecate POSIX_ENV _CONFSTR _SYSCONF and _UNAME
May 22, 2024
06ac6d7
posix: deprecate PTHREAD_SPINLOCK for POSIX_SPIN_LOCKS
May 22, 2024
31d0fd5
posix: deprecate POSIX_MQUEUE in favour of POSIX_MESSAGE_PASSING
May 22, 2024
6d4f3bb
posix: deprecate PTHREAD_RWLOCK for POSIX_READER_WRITER_LOCKS
May 22, 2024
f4c3611
posix: deprecate POSIX_FNMATCH GETOPT GETENTROPY
May 22, 2024
12f6f5c
posix: deprecate POSIX_FS for POSIX_FILE_SYSTEM
May 22, 2024
556bb28
posix: deprecate SEM_VALUE_MAX and SEM_NAMELEN_MAX
May 23, 2024
bff8d12
doc: posix: add kconfig link for async io
May 23, 2024
00312c3
posix: deprecate POSIX_SYSLOG for XSI_SYSTEM_LOGGING
May 23, 2024
20d87fc
posix: deprecate POSIX_PUTMSG for XOPEN_STREAMS
May 23, 2024
b0f0529
posix: deprecate PTHREAD_IPC _MUTEX _COND and _KEY
May 23, 2024
ebfb83e
posix: relocate Kconfig.eventfd to Kconfig.compat
May 23, 2024
81326bf
posix: deprecate POSIX_SIGNAL in favour of POSIX_SIGNALS
May 23, 2024
e41c3ee
posix: reword aio and sched options. add experimental
May 23, 2024
fa8bb98
posix: move getpid() to Kconfig.procN and doc MULTI_PROCESS
May 23, 2024
2b2a2c5
doc: posix: clean up some Kconfig options
May 23, 2024
3d3e8e4
posix: net: update for POSIX_NETWORKING
May 23, 2024
7c32ec4
doc: posix: misc cleanup and add links to system interfaces
May 24, 2024
80869ec
posix: eventfd: remove deprecated eventfd macros
May 28, 2024
b925935
posix: eventfd: fix dependency cycle between net and posix
May 28, 2024
f54caa6
posix: create kconfig options for pse51, pse52, pse53
May 24, 2024
283f24d
doc: release: posix: deprecate non-normative POSIX Kconfig
May 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake/toolchain/armclang/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ choice LIBC_IMPLEMENTATION
config ARMCLANG_STD_LIBC
bool "ARM Compiler C library"
select COMMON_LIBC_STRNLEN
select COMMON_LIBC_TIME if POSIX_CLOCK
select COMMON_LIBC_TIME if POSIX_TIMERS
help
Use the full Arm Compiler runtime libraries.
A reduced Zephyr minimal libc will be used for library functionality
Expand Down
2 changes: 1 addition & 1 deletion doc/connectivity/networking/api/lwm2m.rst
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ engine.

Data caches depends on one of the SenML data formats
:kconfig:option:`CONFIG_LWM2M_RW_SENML_CBOR_SUPPORT` or
:kconfig:option:`CONFIG_LWM2M_RW_SENML_JSON_SUPPORT` and needs :kconfig:option:`CONFIG_POSIX_CLOCK`
:kconfig:option:`CONFIG_LWM2M_RW_SENML_JSON_SUPPORT` and needs :kconfig:option:`CONFIG_POSIX_TIMERS`
so it can request a timestamp from the system and :kconfig:option:`CONFIG_RING_BUFFER` for ring
buffer.

Expand Down
2 changes: 1 addition & 1 deletion doc/connectivity/networking/net_config_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Socket Options
Maximum number of supported poll() entries. One needs to select proper value here depending
on how many BSD sockets are polled in the system.

:kconfig:option:`CONFIG_POSIX_MAX_FDS`
:kconfig:option:`CONFIG_ZVFS_OPEN_MAX`
Maximum number of open file descriptors, this includes files, sockets, special devices, etc.
One needs to select proper value here depending on how many BSD sockets are created in
the system.
Expand Down
13 changes: 13 additions & 0 deletions doc/releases/migration-guide-3.7.rst
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,19 @@ Modem
* The ``CONFIG_MODEM_CHAT_LOG_BUFFER`` Kconfig option was
renamed to :kconfig:option:`CONFIG_MODEM_CHAT_LOG_BUFFER_SIZE`. (:github:`70405`)

.. _zephyr_3.7_posix_api_migration:

POSIX API
=========

* The :ref:`POSIX API Kconfig deprecations <zephyr_3.7_posix_api_deprecations>` may require
changes to Kconfig files (``prj.conf``, etc), as outlined in the release notes. A more automated
approach is available via the provided migration script. Simply run the following:

.. code-block:: bash

$ python ${ZEPHYR_BASE}/scripts/utils/migrate_posix_kconfigs.py -r root_path

Shell
=====

Expand Down
49 changes: 49 additions & 0 deletions doc/releases/release-notes-3.7.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,55 @@ Deprecated in this release
Application developer will now need to set the advertised name themselves by updating the advertising data
or the scan response data.

.. _zephyr_3.7_posix_api_deprecations:

* POSIX API

* Deprecated :c:macro:`PTHREAD_BARRIER_DEFINE` has been removed.
dleach02 marked this conversation as resolved.
Show resolved Hide resolved
* Deprecated :c:macro:`EFD_IN_USE` and :c:macro:`EFD_FLAGS_SET` have been removed.

* In efforts to use Kconfig options that map directly to the Options and Option Groups in
IEEE 1003.1-2017, the following Kconfig options have been deprecated (replaced by):

* :kconfig:option:`CONFIG_EVENTFD_MAX` (:kconfig:option:`CONFIG_ZVFS_EVENTFD_MAX`)
* :kconfig:option:`CONFIG_FNMATCH` (:kconfig:option:`CONFIG_POSIX_C_LIB_EXT`)
* :kconfig:option:`CONFIG_GETENTROPY` (:kconfig:option:`CONFIG_POSIX_C_LIB_EXT`)
* :kconfig:option:`CONFIG_GETOPT` (:kconfig:option:`CONFIG_POSIX_C_LIB_EXT`)
 * :kconfig:option:`CONFIG_MAX_PTHREAD_COUNT` (:kconfig:option:`CONFIG_POSIX_THREAD_THREADS_MAX`)
* :kconfig:option:`CONFIG_MAX_PTHREAD_KEY_COUNT` (:kconfig:option:`CONFIG_POSIX_THREAD_KEYS_MAX`)
* :kconfig:option:`CONFIG_MAX_TIMER_COUNT` (:kconfig:option:`CONFIG_POSIX_TIMER_MAX`)
cfriedt marked this conversation as resolved.
Show resolved Hide resolved
* :kconfig:option:`CONFIG_POSIX_LIMITS_RTSIG_MAX` (:kconfig:option:`CONFIG_POSIX_RTSIG_MAX`)
* :kconfig:option:`CONFIG_POSIX_CLOCK` (:kconfig:option:`CONFIG_POSIX_CLOCK_SELECTION`,
:kconfig:option:`CONFIG_POSIX_CPUTIME`, :kconfig:option:`CONFIG_POSIX_MONOTONIC_CLOCK`,
:kconfig:option:`CONFIG_POSIX_TIMERS`, and :kconfig:option:`CONFIG_POSIX_TIMEOUTS`)
* :kconfig:option:`CONFIG_POSIX_CONFSTR` (:kconfig:option:`CONFIG_POSIX_SINGLE_PROCESS`)
* :kconfig:option:`CONFIG_POSIX_ENV` (:kconfig:option:`CONFIG_POSIX_SINGLE_PROCESS`)
* :kconfig:option:`CONFIG_POSIX_FS` (:kconfig:option:`CONFIG_POSIX_FILE_SYSTEM`)
* :kconfig:option:`CONFIG_POSIX_MAX_FDS` (:kconfig:option:`CONFIG_POSIX_OPEN_MAX` and
:kconfig:option:`CONFIG_ZVFS_OPEN_MAX`)
* :kconfig:option:`CONFIG_POSIX_MAX_OPEN_FILES` (:kconfig:option:`CONFIG_POSIX_OPEN_MAX` and
:kconfig:option:`CONFIG_ZVFS_OPEN_MAX`)
* :kconfig:option:`CONFIG_POSIX_MQUEUE` (:kconfig:option:`CONFIG_POSIX_MESSAGE_PASSING`)
* :kconfig:option:`CONFIG_POSIX_PUTMSG` (:kconfig:option:`CONFIG_XOPEN_STREAMS`)
* :kconfig:option:`CONFIG_POSIX_SIGNAL` (:kconfig:option:`CONFIG_POSIX_SIGNALS`)
* :kconfig:option:`CONFIG_POSIX_SYSCONF` (:kconfig:option:`CONFIG_POSIX_SINGLE_PROCESS`)
* :kconfig:option:`CONFIG_POSIX_SYSLOG` (:kconfig:option:`CONFIG_XSI_SYSTEM_LOGGING`)
* :kconfig:option:`CONFIG_POSIX_UNAME` (:kconfig:option:`CONFIG_POSIX_SINGLE_PROCESS`)
* :kconfig:option:`CONFIG_PTHREAD` (:kconfig:option:`CONFIG_POSIX_THREADS`)
* :kconfig:option:`CONFIG_PTHREAD_BARRIER` (:kconfig:option:`CONFIG_POSIX_BARRIERS`)
* :kconfig:option:`CONFIG_PTHREAD_COND` (:kconfig:option:`CONFIG_POSIX_THREADS`)
* :kconfig:option:`CONFIG_PTHREAD_IPC` (:kconfig:option:`CONFIG_POSIX_THREADS`)
* :kconfig:option:`CONFIG_PTHREAD_KEY` (:kconfig:option:`CONFIG_POSIX_THREADS`)
* :kconfig:option:`CONFIG_PTHREAD_MUTEX` (:kconfig:option:`CONFIG_POSIX_THREADS`)
* :kconfig:option:`CONFIG_PTHREAD_RWLOCK` (:kconfig:option:`CONFIG_POSIX_READER_WRITER_LOCKS`)
* :kconfig:option:`CONFIG_PTHREAD_SPINLOCK` (:kconfig:option:`CONFIG_POSIX_SPIN_LOCKS`)
* :kconfig:option:`CONFIG_SEM_NAMELEN_MAX` (:kconfig:option:`CONFIG_POSIX_SEM_NAMELEN_MAX`)
* :kconfig:option:`CONFIG_SEM_VALUE_MAX` (:kconfig:option:`CONFIG_POSIX_SEM_VALUE_MAX`)
* :kconfig:option:`CONFIG_TIMER` (:kconfig:option:`CONFIG_POSIX_TIMERS`)
* :kconfig:option:`CONFIG_TIMER_DELAYTIMER_MAX` (:kconfig:option:`CONFIG_POSIX_DELAYTIMER_MAX`)

Please see the :ref:`POSIX API migration guide <zephyr_3.7_posix_api_migration>`.

* SPI

* Deprecated :c:func:`spi_is_ready` API function has been removed.
Expand Down
45 changes: 22 additions & 23 deletions doc/services/portability/posix/aep/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,18 @@ The *Minimal Realtime System Profile* (PSE51) includes all of the
:header: Symbol, Support, Remarks
:widths: 50, 10, 50

_POSIX_AEP_REALTIME_MINIMAL, -1,
_POSIX_AEP_REALTIME_MINIMAL, -1, :kconfig:option:`CONFIG_POSIX_AEP_REALTIME_MINIMAL`

.. csv-table:: PSE51 Option Groups
:header: Symbol, Support, Remarks
:widths: 50, 10, 50

:ref:`POSIX_C_LANG_JUMP <posix_option_group_c_lang_jump>`, yes,
:ref:`POSIX_C_LANG_SUPPORT <posix_option_group_c_lang_support>`, yes,
:ref:`POSIX_DEVICE_IO <posix_option_group_device_io>`,,
:ref:`POSIX_SIGNALS <posix_option_group_signals>`,,
:ref:`POSIX_SINGLE_PROCESS <posix_option_group_single_process>`, yes,
:ref:`POSIX_THREADS_BASE <posix_option_group_threads_base>`, yes,
:ref:`XSI_THREADS_EXT <posix_option_group_xsi_threads_ext>`, yes,
:ref:`POSIX_DEVICE_IO <posix_option_group_device_io>`,, :kconfig:option:`CONFIG_POSIX_DEVICE_IO`
:ref:`POSIX_SIGNALS <posix_option_group_signals>`,, :kconfig:option:`CONFIG_POSIX_SIGNALS`
:ref:`POSIX_SINGLE_PROCESS <posix_option_group_single_process>`, yes, :kconfig:option:`CONFIG_POSIX_SINGLE_PROCESS`
:ref:`XSI_THREADS_EXT <posix_option_group_xsi_threads_ext>`, yes, :kconfig:option:`CONFIG_XSI_THREADS_EXT`

.. csv-table:: PSE51 Option Requirements
:header: Symbol, Support, Remarks
Expand All @@ -63,15 +62,15 @@ The *Minimal Realtime System Profile* (PSE51) includes all of the
:ref:`_POSIX_FSYNC <posix_option_fsync>`, 200809L, :kconfig:option:`CONFIG_POSIX_FSYNC`
:ref:`_POSIX_MEMLOCK <posix_option_memlock>`, -1,
:ref:`_POSIX_MEMLOCK_RANGE <posix_option_memlock_range>`, -1,
:ref:`_POSIX_MONOTONIC_CLOCK <posix_option_monotonic_clock>`, 200809L, :kconfig:option:`CONFIG_POSIX_CLOCK`
:ref:`_POSIX_MONOTONIC_CLOCK <posix_option_monotonic_clock>`, 200809L, :kconfig:option:`CONFIG_POSIX_MONOTONIC_CLOCK`
:ref:`_POSIX_SHARED_MEMORY_OBJECTS <posix_shared_memory_objects>`, -1,
:ref:`_POSIX_SYNCHRONIZED_IO <posix_option_synchronized_io>`, -1,
:ref:`_POSIX_THREAD_ATTR_STACKADDR<posix_option_thread_attr_stackaddr>`, 200809L, :kconfig:option:`CONFIG_PTHREAD`
:ref:`_POSIX_THREAD_ATTR_STACKSIZE<posix_option_thread_attr_stacksize>`, 200809L, :kconfig:option:`CONFIG_PTHREAD`
:ref:`_POSIX_THREAD_CPUTIME <posix_option_thread_cputime>`, -1,
_POSIX_THREAD_PRIO_INHERIT, 200809L, :kconfig:option:`CONFIG_PTHREAD_MUTEX`
_POSIX_THREAD_PRIO_PROTECT, -1,
:ref:`_POSIX_THREAD_PRIORITY_SCHEDULING<posix_option_thread_priority_scheduling>`, 200809L, :kconfig:option:`CONFIG_POSIX_PRIORITY_SCHEDULING`
:ref:`_POSIX_SYNCHRONIZED_IO <posix_option_synchronized_io>`, -1, :kconfig:option:`CONFIG_POSIX_SYNCHRONIZED_IO`
:ref:`_POSIX_THREAD_ATTR_STACKADDR<posix_option_thread_attr_stackaddr>`, 200809L, :kconfig:option:`CONFIG_POSIX_THREAD_ATTR_STACKADDR`
:ref:`_POSIX_THREAD_ATTR_STACKSIZE<posix_option_thread_attr_stacksize>`, 200809L, :kconfig:option:`CONFIG_POSIX_THREAD_ATTR_STACKSIZE`
:ref:`_POSIX_THREAD_CPUTIME <posix_option_thread_cputime>`, 200809L, :kconfig:option:`CONFIG_POSIX_CPUTIME`
:ref:`_POSIX_THREAD_PRIO_INHERIT <posix_option_thread_prio_inherit>`, 200809L, :kconfig:option:`CONFIG_POSIX_THREAD_PRIO_INHERIT`
:ref:`_POSIX_THREAD_PRIO_PROTECT <posix_option_thread_prio_protect>`, -1, :kconfig:option:`CONFIG_POSIX_THREAD_PRIO_PROTECT`
:ref:`_POSIX_THREAD_PRIORITY_SCHEDULING <posix_option_thread_priority_scheduling>`, 200809L, :kconfig:option:`CONFIG_POSIX_THREAD_PRIORITY_SCHEDULING`
_POSIX_THREAD_SPORADIC_SERVER, -1,

.. _posix_aep_pse52:
Expand All @@ -95,21 +94,21 @@ The *Realtime Controller System Profile* (PSE52) includes all features from PSE5
:header: Symbol, Support, Remarks
:widths: 50, 10, 50

_POSIX_AEP_REALTIME_CONTROLLER, -1,
_POSIX_AEP_REALTIME_CONTROLLER, -1, :kconfig:option:`CONFIG_POSIX_AEP_REALTIME_CONTROLLER`

.. csv-table:: PSE52 Option Groups
:header: Symbol, Support, Remarks
:widths: 50, 10, 50

:ref:`POSIX_C_LANG_MATH <posix_option_group_c_lang_math>`, yes,
:ref:`POSIX_FD_MGMT <posix_option_group_fd_mgmt>`,,
:ref:`POSIX_FILE_SYSTEM <posix_option_group_file_system>`,,
:ref:`POSIX_FD_MGMT <posix_option_group_fd_mgmt>`,, :kconfig:option:`CONFIG_POSIX_FD_MGMT`
:ref:`POSIX_FILE_SYSTEM <posix_option_group_file_system>`,, :kconfig:option:`CONFIG_POSIX_FILE_SYSTEM`

.. csv-table:: PSE52 Option Requirements
:header: Symbol, Support, Remarks
:widths: 50, 10, 50

:ref:`_POSIX_MESSAGE_PASSING <posix_option_message_passing>`, 200809L, :kconfig:option:`CONFIG_POSIX_MQUEUE`
:ref:`_POSIX_MESSAGE_PASSING <posix_option_message_passing>`, 200809L, :kconfig:option:`CONFIG_POSIX_MESSAGE_PASSING`
_POSIX_TRACE, -1,
_POSIX_TRACE_EVENT_FILTER, -1,
_POSIX_TRACE_LOG, -1,
Expand All @@ -135,25 +134,25 @@ The *Dedicated Realtime System Profile* (PSE53) includes all features from PSE52
:header: Symbol, Support, Remarks
:widths: 50, 10, 50

_POSIX_AEP_REALTIME_DEDICATED, -1,
_POSIX_AEP_REALTIME_DEDICATED, -1, :kconfig:option:`CONFIG_POSIX_AEP_REALTIME_DEDICATED`

.. csv-table:: PSE53 Option Groups
:header: Symbol, Support, Remarks
:widths: 50, 10, 50

POSIX_MULTI_PROCESS,, :ref:`†<posix_undefined_behaviour>`
:ref:`POSIX_NETWORKING <posix_option_group_networking>`, yes,
:ref:`POSIX_MULTI_PROCESS<posix_option_group_multi_process>`,, :kconfig:option:`CONFIG_POSIX_MULTI_PROCESS`:ref:`†<posix_undefined_behaviour>`
:ref:`POSIX_NETWORKING <posix_option_group_networking>`, yes, :kconfig:option:`CONFIG_POSIX_NETWORKING`
:ref:`POSIX_PIPE <posix_option_group_pipe>`,,
:ref:`POSIX_SIGNAL_JUMP <posix_option_group_signal_jump>`,,

.. csv-table:: PSE53 Option Requirements
:header: Symbol, Support, Remarks
:widths: 50, 10, 50

_POSIX_CPUTIME, -1,
:ref:`_POSIX_CPUTIME <posix_option_cputime>`, 200809L, :kconfig:option:`CONFIG_POSIX_CPUTIME`
_POSIX_PRIORITIZED_IO, -1,
:ref:`_POSIX_PRIORITY_SCHEDULING <posix_option_priority_scheduling>`, -1,
_POSIX_RAW_SOCKETS, 200809L, :kconfig:option:`CONFIG_NET_SOCKETS_PACKET`
:ref:`_POSIX_RAW_SOCKETS <posix_option_raw_sockets>`, 200809L, :kconfig:option:`CONFIG_POSIX_RAW_SOCKETS`
_POSIX_SPAWN, -1, :ref:`†<posix_undefined_behaviour>`
_POSIX_SPORADIC_SERVER, -1, :ref:`†<posix_undefined_behaviour>`

Expand Down
Loading
Loading