doc: Update documentation related to pipes

The pipes implementation has been updated to allow ISRs to both
send and receive data to/from pipes provided the K_NO_WAIT timeout
option is used.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
This commit is contained in:
Peter Mitsis 2022-07-14 22:38:10 -04:00 committed by Carles Cufí
commit d13a2544f7
2 changed files with 12 additions and 5 deletions

View file

@ -54,8 +54,9 @@ pended writer to fill the ring buffer.
Flushing does not in practice allocate or use additional buffers. Flushing does not in practice allocate or use additional buffers.
.. note:: .. note::
The kernel does NOT allow for an ISR to send or receive data to/from a The kernel does allow for an ISR to flush a pipe from an ISR. It also
pipe or flush even if it does not attempt to wait for space/data. allows it to send/receive data to/from one provided it does not attempt
to wait for space/data.
Implementation Implementation
************** **************
@ -219,7 +220,10 @@ Suggested uses
Use a pipe to send streams of data between threads. Use a pipe to send streams of data between threads.
.. note:: .. note::
A pipe can be used to transfer long streams of data if desired. However it is often preferable to send pointers to large data items to avoid copying the data. A pipe can be used to transfer long streams of data if desired. However it
is often preferable to send pointers to large data items to avoid copying
the data. Copying large data items will negatively impact interrupt latency
as a spinlock is held while copying that data.
Configuration Options Configuration Options
@ -227,7 +231,7 @@ Configuration Options
Related configuration options: Related configuration options:
* None. * CONFIG_PIPES
API Reference API Reference
************* *************

View file

@ -61,7 +61,7 @@ LIFO No Queue Arbitrary [1]
Stack No Array Word Word Yes [3] Yes Undefined behavior Stack No Array Word Word Yes [3] Yes Undefined behavior
Message queue No Ring buffer Power of two Power of two Yes [3] Yes Pend thread or return -errno Message queue No Ring buffer Power of two Power of two Yes [3] Yes Pend thread or return -errno
Mailbox Yes Queue Arbitrary [1] Arbitrary No No N/A Mailbox Yes Queue Arbitrary [1] Arbitrary No No N/A
Pipe No Ring buffer [4] Arbitrary Arbitrary No No Pend thread or return -errno Pipe No Ring buffer [4] Arbitrary Arbitrary Yes [5] Yes [5] Pend thread or return -errno
=============== ============== =================== ============== ============== ================= ============== =============================== =============== ============== =================== ============== ============== ================= ============== ===============================
[1] Callers allocate space for queue overhead in the data [1] Callers allocate space for queue overhead in the data
@ -76,6 +76,9 @@ argument.
[4] Optional. [4] Optional.
[5] ISRS can send and/or receive only when passing K_NO_WAIT as the
timeout argument.
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1