Skip to content

Commit 762861d

Browse files
Mattemagikernkartben
authored andcommitted
doc: Add k_pipe deprecation notice to 4.1 release notes
Add a notice to the 4.1 release notes that CONFIG_PIPES k_pipe implementation is deprecated from 4.1. Signed-off-by: Måns Ansgariusson <[email protected]>
1 parent 9cb0fbf commit 762861d

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

doc/releases/migration-guide-4.1.rst

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,45 @@ perform a full erase, pass the ``--erase`` option when executing ``west flash``.
4141
Kernel
4242
******
4343

44+
45+
k_pipe API
46+
==========
47+
48+
The k_pipe API has been reworked and the API used in ``CONFIG_PIPES`` is now deprecated.
49+
The k_pipe API is enabled by default when ``CONFIG_MULTITHREADING`` is set.
50+
Function renames and modifications:
51+
52+
.. list-table::
53+
:header-rows: 1
54+
55+
* - Old API
56+
- New API
57+
- Changes
58+
* - ``k_pipe_put(..)``
59+
- ``k_pipe_write(..)``
60+
- Removed ``min_xfer`` parameter (partial transfers based on thresholds are no longer supported)
61+
``bytes_written`` is now the return value
62+
* - ``k_pipe_get(..)``
63+
- ``k_pipe_read(..)``
64+
- Removed ``min_xfer`` parameter (partial transfers based on thresholds are no longer supported)
65+
``bytes_read`` is now the return value
66+
* - ``k_pipe_flush(..)`` & ``k_pipe_buffer_flush(..)``
67+
- ``k_pipe_reset(..)``
68+
- Reset the pipe, discarding all data in the pipe, non blocking.
69+
* - ``k_pipe_alloc_init(..)``, ``k_pipe_cleanup(..)``
70+
- **Removed**
71+
- Dynamic allocation of pipes is no longer supported
72+
* - ``k_pipe_read_avail(..)``, ``k_pipe_write_avail(..)``
73+
- **Removed**
74+
- Querying the number of bytes in the pipe is no longer supported
75+
* - None
76+
- ``k_pipe_close(..)``
77+
- Close a pipe, waking up all pending readers and writers with an error code. No further
78+
reading or writing is allowed on the pipe. The pipe can be re-opened by calling
79+
``k_pipe_init(..)`` again. **Note**, all data in the pipe is available to readers until the
80+
pipe is emptied.
81+
82+
4483
Security
4584
********
4685

doc/releases/release-notes-4.1.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,26 @@ Deprecated APIs and options
147147
1. when Stream Flash is not configured to do erase on its own
148148
2. when erase is used for removal of a data prior or after Stream Flash uses the designated area.
149149

150+
* The pipe API has been reworked.
151+
The new API is enabled by default when ``CONFIG_MULTITHREADING`` is set.
152+
153+
* Deprecates the ``CONFIG_PIPES`` Kconfig option.
154+
* Introduces the ``k_pipe_close(..)`` function.
155+
* ``k_pipe_put(..)`` translates to ``k_pipe_write(..)``.
156+
* ``k_pipe_get(..)`` translates to ``k_pipe_read(..)``.
157+
* ``k_pipe_flush(..)`` & ``k_pipe_buffer_flush()`` can be translated to ``k_pipe_reset(..)``.
158+
159+
* Dynamic allocation of pipes is no longer supported.
160+
161+
- ``k_pipe_alloc_init(..)`` API has been removed.
162+
- ``k_pipe_cleanup(..)`` API has been removed.
163+
164+
* Querying the number of bytes in the pipe is no longer supported.
165+
166+
- ``k_pipe_read_avail(..)`` API has been removed.
167+
- ``k_pipe_write_avail(..)`` API has been removed.
168+
169+
150170
* For the native_sim target :kconfig:option:`CONFIG_NATIVE_SIM_NATIVE_POSIX_COMPAT` has been
151171
switched to ``n`` by default, and this option has been deprecated.
152172

0 commit comments

Comments
 (0)