zephyr/samples
Tom Burdick 3998f9f898 rtio: Shareable lock-free iodevs
By using an mpsc queue for each iodev, the iodev itself is shareable across
contexts. Since its lock free, submits may occur even from an ISR context.

Rather than a fixed size queue, and with it the possibility of running
out of pre-allocated spots, each iodev now holds a wait-free mpsc
queue head.

This changes the parameter of iodev submit to be a struct containing 4
pointers for the rtio context, the submission queue entry, and the mpsc
node for the iodevs submission queue.

This solves the problem involving busy iodevs working with real
devices. For example a busy SPI bus driver could enqueue, without locking,
a request to start once the current request is done.

The queue entries are expected to be owned and allocated by the
executor rather than the iodev. This helps simplify potential
tuning knobs to one place, the RTIO context and its executor an
application directly uses.

As the test case shows iodevs can operate effectively lock free
with the mpsc queue and a single atomic denoting the current task.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-03-03 09:18:09 +01:00
..
application_development treewide: update usage of zephyr_code_relocate 2023-01-17 18:08:37 +01:00
arch boards: xtensa: m5stickc_plus: initial support 2023-01-09 10:16:27 +01:00
basic samples: basic: hash_map increasing the stack size for cxx_unordered_map 2023-03-02 07:05:09 -05:00
bluetooth Samples: Bluetooth: Fix scanning restart for broadcast audio sink 2023-03-02 10:00:56 +01:00
boards samples and tests: Add REQUIRED to Zephyr find_package call 2023-03-02 09:58:27 +01:00
compression samples: compression: lz4 requires more than 64kB of RAM 2022-11-02 16:06:06 -05:00
cpp subsys/cpp: Also run C++ tests with picolibc when possible 2023-01-20 09:03:25 +01:00
drivers dts: gpio: Add Microchip XEC GPIO macros for use in device tree 2023-03-02 13:52:03 +01:00
hello_world yamllint: indentation: fix files in samples/ 2023-01-04 14:23:53 +01:00
kernel yamllint: indentation: fix files in samples/ 2023-01-04 14:23:53 +01:00
modules samples and tests: Add REQUIRED to Zephyr find_package call 2023-03-02 09:58:27 +01:00
net samples and tests: Add REQUIRED to Zephyr find_package call 2023-03-02 09:58:27 +01:00
philosophers Revert "Samples: Philosophers: Revert stack size change" 2023-02-22 08:15:56 -05:00
posix samples: posix: gettimeofday: include time.h 2023-01-11 09:41:29 +01:00
sensor samples and tests: Add REQUIRED to Zephyr find_package call 2023-03-02 09:58:27 +01:00
shields samples: shields: npm6001_ek: remove dead assignment 2022-12-27 13:12:55 +01:00
subsys rtio: Shareable lock-free iodevs 2023-03-03 09:18:09 +01:00
synchronization samples: synchronization: Convert CONFIG_MP_NUM_CPUS handling 2022-10-27 13:59:57 -04:00
tfm_integration samples: tfm: Disable initial attestation test 2023-02-11 07:59:06 +09:00
userspace yamllint: indentation: fix files in samples/ 2023-01-04 14:23:53 +01:00
classic.rst
index.rst samples: cpp: Relocate samples/subsys/cpp to samples/cpp 2023-01-13 17:42:55 -05:00
sample_definition_and_criteria.rst Bluetooth: Remove point 6 of Samples Guidelines 2023-02-06 10:43:31 +01:00