Skip to content

Commit 1e34ea9

Browse files
mbolivar-nordicioannisg
authored andcommitted
doc: add summary table for kernel data passing
Add a table summarizing the key characteristics of each of the data passing objects. It is useful for readers to have an overview they can skim without having to read each section in detail. Signed-off-by: Marti Bolivar <[email protected]>
1 parent e9c858a commit 1e34ea9

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

doc/reference/kernel/index.rst

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,34 @@ synchronization.
4040
Data Passing
4141
************
4242

43-
These pages cover kernel services which can be used to pass data between
43+
These pages cover kernel objects which can be used to pass data between
4444
threads and ISRs.
4545

46+
The following table summarizes their high-level features.
47+
48+
=============== ============== =================== ============== ============== ================= ============== ===============================
49+
Object Bidirectional? Data structure Data item size Data Alignment ISRs can receive? ISRs can send? Overrun handling
50+
=============== ============== =================== ============== ============== ================= ============== ===============================
51+
FIFO No Queue Arbitrary [1] 4 B [2] Yes [3] Yes N/A
52+
LIFO No Queue Arbitrary [1] 4 B [2] Yes [3] Yes N/A
53+
Stack No Array Word Word Yes [3] Yes Undefined behavior
54+
Message queue No Ring buffer Power of two Power of two Yes [3] Yes Pend thread or return -errno
55+
Mailbox Yes Queue Arbitrary [1] Arbitrary No No N/A
56+
Pipe No Ring buffer [4] Arbitrary Arbitrary No No Pend thread or return -errno
57+
=============== ============== =================== ============== ============== ================= ============== ===============================
58+
59+
[1] Callers allocate space for queue overhead in the data
60+
elements themselves.
61+
62+
[2] Objects added with k_fifo_alloc_put() and k_lifo_alloc_put()
63+
do not have alignment constraints, but use temporary memory from the
64+
calling thread's resource pool.
65+
66+
[3] ISRs can receive only when passing K_NO_WAIT as the timeout
67+
argument.
68+
69+
[4] Optional.
70+
4671
.. toctree::
4772
:maxdepth: 2
4873

0 commit comments

Comments
 (0)