Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions doc/releases/release-notes-4.3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ Deprecated APIs and options

* RISCV's :kconfig:option:`CONFIG_EXTRA_EXCEPTION_INFO` is deprecated. Use :kconfig:option:`CONFIG_EXCEPTION_DEBUG` instead.

* :kconfig:option:`CONFIG_XOPEN_STREAMS` was deprecated. Instead, use :kconfig:option:`CONFIG_XSI_STREAMS`.

* :kconfig:option:`CONFIG_POSIX_API` was deprecated. See :ref:`POSIX Configuration<posix_config>`
for more details.

New APIs and options
====================

Expand Down
2 changes: 1 addition & 1 deletion doc/services/portability/posix/conformance/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ POSIX System Interfaces
_XOPEN_CRYPT, -1,
:ref:`_XOPEN_REALTIME <posix_option_group_xsi_realtime>`, 700, :kconfig:option:`CONFIG_XSI_REALTIME`
_XOPEN_REALTIME_THREADS, -1,
:ref:`_XOPEN_STREAMS<posix_option_xopen_streams>`, 200809L, :kconfig:option:`CONFIG_XOPEN_STREAMS`
:ref:`_XOPEN_STREAMS<posix_option_xopen_streams>`, 200809L, :kconfig:option:`CONFIG_XSI_STREAMS`
_XOPEN_UNIX, -1,


Expand Down
2 changes: 1 addition & 1 deletion doc/services/portability/posix/kconfig/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ implementation of the POSIX API.
* :kconfig:option:`CONFIG_NET_SOCKETS`
* :kconfig:option:`CONFIG_ZVFS_POLL_MAX`
* :kconfig:option:`CONFIG_ZVFS_OPEN_MAX`
* :kconfig:option:`CONFIG_POSIX_API`
* :kconfig:option:`CONFIG_POSIX_SYSTEM_INTERFACES`
* :kconfig:option:`CONFIG_POSIX_OPEN_MAX`
* :kconfig:option:`CONFIG_POSIX_PTHREAD_ATTR_GUARDSIZE_BITS`
* :kconfig:option:`CONFIG_POSIX_PTHREAD_ATTR_GUARDSIZE_DEFAULT`
Expand Down
2 changes: 1 addition & 1 deletion doc/services/portability/posix/option_groups/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ implemented in Zephyr but are provided so that conformant applications can still
Unimplemented functions in this option group will fail, setting ``errno`` to ``ENOSYS``
:ref:`†<posix_undefined_behaviour>`.

Enable this option with :kconfig:option:`CONFIG_XOPEN_STREAMS`.
Enable this option with :kconfig:option:`CONFIG_XSI_STREAMS`.

.. csv-table:: _XOPEN_STREAMS
:header: API, Supported
Expand Down
28 changes: 10 additions & 18 deletions doc/services/portability/posix/overview/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ leverages the ``nanosleep()`` and ``perror()`` POSIX functions.
.. code-block:: cfg
:caption: `prj.conf` for a simple POSIX app in Zephyr

CONFIG_POSIX_API=y
CONFIG_POSIX_AEP_REALTIME_MINIMAL=y

.. code-block:: c
:caption: A simple app that uses Zephyr's POSIX API
:caption: A simple app that uses the POSIX API

#include <stddef.h>
#include <stdio.h>
Expand Down Expand Up @@ -128,38 +128,30 @@ explicitly choose to enable POSIX options via :ref:`Kconfig<kconfig>` selection.
Subprofiles
+++++++++++

Enable one of the Kconfig options below to quickly configure a pre-defined
Applications should enable one of the Kconfig options below to quickly configure a pre-defined
:ref:`POSIX subprofile <posix_subprofiles>`.

* :kconfig:option:`CONFIG_POSIX_AEP_CHOICE_BASE` (:ref:`Base <posix_system_interfaces_required>`)
* :kconfig:option:`CONFIG_POSIX_AEP_CHOICE_PSE51` (:ref:`PSE51 <posix_aep_pse51>`)
* :kconfig:option:`CONFIG_POSIX_AEP_CHOICE_PSE52` (:ref:`PSE52 <posix_aep_pse52>`)
* :kconfig:option:`CONFIG_POSIX_AEP_CHOICE_PSE53` (:ref:`PSE53 <posix_aep_pse53>`)

Additional POSIX :ref:`Options and Option Groups <posix_option_groups>` may be enabled as needed
via Kconfig (e.g. ``CONFIG_POSIX_C_LIB_EXT=y``). Further fine-tuning may be accomplished via
:ref:`additional POSIX-related Kconfig options <posix_kconfig_options>`.
Libraries should depend on :kconfig:option:`CONFIG_POSIX_SYSTEM_INTERFACES` and other
POSIX :ref:`Option Groups <posix_option_groups>`, as needed.

Subprofiles, Options, and Option Groups should be considered the preferred way to configure POSIX
in Zephyr going forward.
Further fine-tuning may be accomplished via
:ref:`additional POSIX-related Kconfig options <posix_kconfig_options>`.

Legacy
++++++

Historically, Zephyr used :kconfig:option:`CONFIG_POSIX_API` to configure a set of POSIX features
that was overloaded and always increasing in size.

* :kconfig:option:`CONFIG_POSIX_API`

The option is now frozen, and can be considered equivalent to the following:

* :kconfig:option:`CONFIG_POSIX_AEP_CHOICE_PSE51`
* :kconfig:option:`CONFIG_POSIX_FD_MGMT`
* :kconfig:option:`CONFIG_POSIX_MESSAGE_PASSING`
* :kconfig:option:`CONFIG_POSIX_NETWORKING`
The :kconfig:option:`CONFIG_POSIX_API` is now deprecated and is slated for removal in Zephyr
v4.5.0.

However, :kconfig:option:`CONFIG_POSIX_API` should be considered legacy and should not be used for
new Zephyr applications.
Applications should select a POSIX subprofile mentioned above.

.. _IEEE: https://www.ieee.org/
.. _IEEE Computer Society: https://www.computer.org/
Expand Down
2 changes: 1 addition & 1 deletion drivers/modem/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ config MODEM_SOCKET
Note that the modem socket uses runtime allocated file descriptors
reserved from the fdtable, for which the max count is set using the
Kconfig option ZVFS_OPEN_MAX. Make sure to update this value as both
the modem sockets and the POSIX_API, if used, share them.
the modem sockets and other POSIX APIs, if used, share them.

config MODEM_SOCKET_PACKET_COUNT
int "Maximum number of stored packet sizes per socket"
Expand Down
2 changes: 1 addition & 1 deletion drivers/modem/ublox-sara-r4.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ LOG_MODULE_REGISTER(modem_ublox_sara_r4, CONFIG_MODEM_LOG_LEVEL);
#include <zephyr/drivers/gpio.h>
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/posix/fcntl.h>
#include <fcntl.h>

#include <zephyr/net/net_if.h>
#include <zephyr/net/net_offload.h>
Expand Down
4 changes: 0 additions & 4 deletions drivers/net/nsos_fcntl.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@
/*
* When building for Zephyr, use Zephyr specific fcntl definitions.
*/
#ifdef __ZEPHYR__
#include <zephyr/posix/fcntl.h>
#else
#include <fcntl.h>
#endif

#include "nsi_errno.h"
#include "nsos_fcntl.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/nsos_sockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ LOG_MODULE_REGISTER(nsos_sockets);
#include <zephyr/net/net_ip.h>
#include <zephyr/net/offloaded_netdev.h>
#include <zephyr/net/socket_offload.h>
#include <zephyr/posix/fcntl.h>
#include <fcntl.h>
#include <zephyr/sys/fdtable.h>
#include <zephyr/sys/dlist.h>

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ppp.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LOG_MODULE_REGISTER(net_ppp, LOG_LEVEL);
#include <zephyr/sys/crc.h>
#include <zephyr/drivers/uart.h>
#include <zephyr/random/random.h>
#include <zephyr/posix/net/if_arp.h>
#include <net/if_arp.h>
#include <zephyr/net/ethernet.h>
#include <zephyr/net/capture.h>

Expand Down
11 changes: 8 additions & 3 deletions drivers/wifi/nxp/Kconfig.nxp
Original file line number Diff line number Diff line change
Expand Up @@ -1133,10 +1133,15 @@ if NXP_WIFI_SMOKE_TESTS

config NXP_WIFI_SIGMA_AGENT
bool "Wi-Fi Alliance Sigma Agent Support"
select POSIX_API
select POSIX_THREADS
select POSIX_SYSTEM_INTERFACES
select POSIX_BASE_DEFINITIONS
select POSIX_AEP_REALTIME_MINIMAL
select POSIX_NETWORKING
imply EVENTFD
imply POSIX_FD_MGMT
imply POSIX_MULTI_PROCESS
imply XSI_SINGLE_PROCESS
select PTHREAD_CREATE_BARRIER
select POSIX_TIMERS
help
This option is to enable Wi-Fi Alliance Sigma Agent support in the Wi-Fi driver.

Expand Down
2 changes: 2 additions & 0 deletions drivers/wifi/simplelink/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ if(CONFIG_WIFI_SIMPLELINK)
simplelink_support.c
simplelink.c
)
# TI's driver portability layer relies on POSIX for multi-threading and timers
zephyr_library_compile_definitions(_POSIX_C_SOURCE=200809L)
endif()
zephyr_library_sources_ifdef(CONFIG_NET_SOCKETS_OFFLOAD simplelink_sockets.c)
4 changes: 3 additions & 1 deletion drivers/wifi/simplelink/Kconfig.simplelink
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ menuconfig WIFI_SIMPLELINK
select WIFI_OFFLOAD
select NET_L2_WIFI_MGMT
select FDTABLE
select POSIX_SEMAPHORES
# TI's driver portability layer relies on POSIX for multi-threading and timers
select POSIX_BASE_DEFINITIONS
select POSIX_SYSTEM_INTERFACES

if WIFI_SIMPLELINK

Expand Down
2 changes: 1 addition & 1 deletion drivers/wifi/simplelink/simplelink_sockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ LOG_MODULE_DECLARE(LOG_MODULE_NAME);

#include <stdlib.h>
#include <limits.h>
#include <zephyr/posix/fcntl.h>
#include <fcntl.h>

#include <zephyr/kernel.h>
/* Define sockaddr, etc, before simplelink.h */
Expand Down
2 changes: 0 additions & 2 deletions include/zephyr/net/ethernet.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
#include <stdbool.h>
#include <zephyr/sys/atomic.h>

#include <zephyr/net/net_ip.h>
#include <zephyr/net/net_pkt.h>
#include <zephyr/net/lldp.h>
#include <zephyr/sys/util.h>
#include <zephyr/net/net_if.h>
Expand Down
Loading
Loading