zephyr/lib/os
Andy Ross 528bef2d22 lib/os: Add sys_winstream lockless shared memory byte stream IPC
It's not uncommon to have Zephyr running in environments where it
shares a memory bus with a foreign/non-Zephyr system (both the older
Intel Quark and cAVS audio DSP systems share this property).  In those
circumstances, it would be nice to have a utility that allows an
arbitrary-sized chunk of that memory to be used as a unidirectional
buffered byte stream without requiring complicated driver support.
sys_winstream is one such abstraction.

This code is lockless, it makes no synchronization demands of the OS
or hardware beyond memory ordering[1].  It implements a simple
file/socket-style read/write API.  It produces small code and is high
performance (e.g. a read or write on Xtensa is about 60 cycles plus
one per byte copied).  It's bidirectional, with no internal Zephyr
dependencies (allowing it to be easily ported to the foreign system).
And it's quite a bit simpler (especially for the reader) than the
older cAVS trace protocol it's designed to replace.

[1] Which means that right now it won't work reliably on arm64 until
we add a memory barrier framework to Zephyr!  See notes in the code;
the locations for the barriers are present, but there's no utility to
call.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2022-01-13 14:01:23 -05:00
..
assert.c lib: os: remove @return doc for void functions 2022-01-12 16:02:16 -05:00
base64.c
bitarray.c
cbprintf_complete.c
cbprintf_nano.c lib/os/cbprintf_nano.c: avoid sign extension on unsigned formats 2021-09-02 19:37:06 -04:00
cbprintf_packaged.c linker: align _image_rodata and _image_rom start/end/size linker symbols 2021-08-28 08:48:03 -04:00
cbprintf.c
CMakeLists.txt lib/os: Add sys_winstream lockless shared memory byte stream IPC 2022-01-13 14:01:23 -05:00
crc7_sw.c
crc8_sw.c
crc16_sw.c
crc32_sw.c
crc32c_sw.c
dec.c
fdtable.c ARC: LIB: MWDT: add stdout hooks, timespec header 2021-08-13 13:43:19 -05:00
heap_listener.c sys: heap_listener: extend to cover more events 2022-01-10 10:28:04 -05:00
heap-validate.c lib/os/heap: use BIT() and BIT_MASK() on bit fields 2021-12-13 17:16:07 -05:00
heap.c lib: os/heap: fix bytes freed calculation for heap listener 2022-01-10 21:27:28 -05:00
heap.h heap: add functions to get heap runtime statistics 2021-11-11 16:21:43 -05:00
hex.c
json.c json: Fix rule 5.7 violations (Tag name should be unique) 2021-12-01 12:21:19 -05:00
Kconfig lib/os: Add sys_winstream lockless shared memory byte stream IPC 2022-01-13 14:01:23 -05:00
Kconfig.cbprintf
Kconfig.heap lib: os: mem_blocks: add alloc/free event notifications 2022-01-11 16:10:53 -05:00
mem_blocks.c lib: os: mem_blocks: add alloc/free event notifications 2022-01-11 16:10:53 -05:00
mpsc_pbuf.c lib: os: mpsc_pbuf: Add const to mpsc_pbuf_free argument 2022-01-07 18:47:19 +01:00
multi_heap.c lib/os: Add sys_multi_heap utility 2021-10-01 20:38:35 -04:00
mutex.c
notify.c
onoff.c
p4wq.c
printk.c lib: os: remove @return doc for void functions 2022-01-12 16:02:16 -05:00
rb.c
reboot.c drivers: timer: improve sys_timer_disable usage 2021-12-04 07:34:53 -05:00
ring_buffer.c lib: os: ring_buffer: Fix issues in rewinding 2022-01-11 18:19:44 -05:00
sem.c
shared_multi_heap.c multi_heap: Introduce shared multi-heap memory pool manager 2021-10-12 07:44:46 -04:00
thread_entry.c
timeutil.c lib: timeutil: fix implicit conversions from float to double 2021-09-20 19:47:57 -04:00
user_work.c
utf8.c zephyr: Add UTF-8 truncating strlcpy variant 2022-01-11 11:50:15 +01:00
winstream.c lib/os: Add sys_winstream lockless shared memory byte stream IPC 2022-01-13 14:01:23 -05:00