zephyr/tests/lib/ringbuffer
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
..
src ring_buffer: Introduce `RING_BUF_ITEM_SIZEOF` 2022-09-20 09:08:14 +00:00
CMakeLists.txt
Kconfig
prj.conf tests: lib: move ringbuffer to new ztest API 2022-08-18 16:08:44 +02:00
testcase.yaml