zephyr/doc/kernel/data_structures
Henri Xavier 1a276d0ac6 ring_buffer: Introduce RING_BUF_ITEM_SIZEOF
Currently, to compute the 'item' size in a ring buffer, we have
`SIZE32_OF`.

Several issues with this:
- `SIZE32_OF` only works on variables, not types, due to an extra
 parenthesis pair. Indeed, `sizeof((int))` is not valid C, whereas
 `sizeof((my_var))` is.
- `SIZE32_OF` is not a proper public API
- `SIZE32_OF` rounds down if the argument size is not a multiple
 of 4 bytes.

Thus, we introduce a proper `RING_BUF_ITEM_SIZEOF`, fixing the
aforementioned issues.

Signed-off-by: Henri Xavier <datacomos@huawei.com>
2022-09-20 09:08:14 +00:00
..
dlist-empty.png
dlist-single.png
dlist.png
dlist.rst
index.rst doc: kernel: Add documentation to spsc_pbuf 2022-06-07 19:04:35 +02:00
mpsc_pbuf.rst doc: Fix links to Zephyr include directory on Github 2022-04-21 18:35:16 -04:00
rbtree.png
rbtree.rst
ring_buffers.rst ring_buffer: Introduce RING_BUF_ITEM_SIZEOF 2022-09-20 09:08:14 +00:00
slist-empty.png
slist.png
slist.rst
spsc_pbuf.rst doc: kernel: Add documentation to spsc_pbuf 2022-06-07 19:04:35 +02:00