zephyr/include/sys
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.h assert: Add missing include 2021-12-14 11:47:13 -06:00
arch_interface.h drivers/pcie: Add a marco for fixed or MSI IRQ 2022-01-07 10:47:27 -05:00
atomic_arch.h
atomic_builtin.h
atomic_c.h
atomic.h sys: include: remove @return doc for void functions 2022-01-12 16:02:16 -05:00
base64.h
bitarray.h lib/os: bitarray: introduce SYS_BITARRAY_DEFINE_STATIC() 2021-11-24 14:22:23 -05:00
byteorder.h
cbprintf_cxx.h sys: cbprintf: Fix unused arg warning 2021-12-14 11:47:13 -06:00
cbprintf_internal.h zephyr: fix errors when building with -Wundef 2021-12-14 11:47:13 -06:00
cbprintf.h lib: os: cbprintf: Add flags to CBPRINTF_MUST_RUNTIME_PACKAGE 2021-11-29 21:13:56 +01:00
check.h
crc.h
device_mmio.h sys: device_mmio.h replace <toolchain/common.h> with <toolchain.h> 2022-01-07 12:47:31 -05:00
dlist.h sys: include: remove @return doc for void functions 2022-01-12 16:02:16 -05:00
errno_private.h
fdtable.h
heap_listener.h sys: heap_listener: extend to cover more events 2022-01-10 10:28:04 -05:00
kobject.h sys: kobject: Fix header to avoid re-declaratiions 2021-10-02 14:34:14 -04:00
libc-hooks.h libc: minimal: Use new ZRESTRICT macro 2021-11-05 13:29:31 +01:00
list_gen.h
math_extras_impl.h
math_extras.h
mem_blocks.h lib: os: mem_blocks: add memory blocks allocator groups 2022-01-11 16:10:53 -05:00
mem_manage.h
mpsc_packet.h
mpsc_pbuf.h lib: os: mpsc_pbuf: Add const to mpsc_pbuf_free argument 2022-01-07 18:47:19 +01:00
multi_heap.h sys: multi_heap: add missing docstrings 2021-10-07 11:54:23 -04:00
mutex.h sys: include: remove @return doc for void functions 2022-01-12 16:02:16 -05:00
notify.h doc: doxygen: replace option alias with kconfig 2021-06-29 10:26:28 -04:00
onoff.h
p4wq.h toolchain: migrate iterable sections calls to the external API 2021-08-12 17:47:04 -04:00
printk.h sys: include: remove @return doc for void functions 2022-01-12 16:02:16 -05:00
rb.h
reboot.h sys: include: remove @return doc for void functions 2022-01-12 16:02:16 -05:00
ring_buffer.h ring_buffer: Link buffer data to the .noinit section 2021-08-21 21:32:45 -04:00
sem.h toolchain: migrate iterable sections calls to the external API 2021-08-12 17:47:04 -04:00
sflist.h
slist.h
speculation.h
sys_heap.h lib: os: remove @return doc for void functions 2022-01-12 16:02:16 -05:00
sys_io.h include: common: Add sys_set_bits and set_clear_bits inline functions 2021-10-12 08:37:03 -04:00
time_units.h sys: time_units: add missing include 2022-01-11 10:46:20 +01:00
timeutil.h
util_internal.h sys: util: improve IS_EMPTY() implementation 2021-11-11 09:31:57 -05:00
util_loops.h
util_macro.h sys: util: improve IS_EMPTY() implementation 2021-11-11 09:31:57 -05:00
util.h zephyr: Add UTF-8 truncating strlcpy variant 2022-01-11 11:50:15 +01:00
winstream.h lib/os: Add sys_winstream lockless shared memory byte stream IPC 2022-01-13 14:01:23 -05:00