Commit graph

10 commits

Author SHA1 Message Date
Tom Burdick d95caa51a4 sys: Add a lockfree mpsc and spsc queues
Moves the rtio_ prefixed lockfree queues to sys alongside existing
mpsc/spsc pbuf, ringbuf, and similar queue-like data structures.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-06-06 00:42:29 -07:00
Simon Hein 47ec4359b9 doc: Clean up wrong c function links
Resolve wrong documentation c function links for
irq: z_shared_isr, rtio: rtio_cqe_get_mempool_buffer
and sensor: sensor_read

Signed-off-by: Simon Hein <Shein@baumer.com>
2023-12-15 08:51:34 -06:00
Tom Burdick d9a30c1f0a docs: Remove out of date examples
The examples in the RTIO docs were nice but continuously became out of
date without being updated. This is unfortunately the downside of
doc-only samples like this.

Some real, buildable, samples right be better but will take a little
time to write up. In the meantime drop the examples in the docs to avoid
confusion.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-11-14 09:25:54 +01:00
Tom Burdick dae2f33e5e rtio: Remove references to simple executor
The simple executor was removed with the usage of the spsc queue but
some stray references remained. Remove those.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-08-16 20:41:18 +02:00
Dmitry Lukyantsev 34a966f219 doc: Fix a typo
Fix a typo in the spelling of "current".
Add "current" to spelling.txt.

Signed-off-by: Dmitry Lukyantsev <dmitrylu@google.com>
2023-08-04 21:18:43 +00:00
Tom Burdick 0aaedf7205 docs: rtio: Show RTIO API Docs again
The RTIO API docs weren't being shown. I made a poor assumption thinking
I could simply include the top level doxygen group in index.rst which isn't
the case. Fix the groups, and remove a note about a poll function
that doesn't exist yet.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-08-04 12:30:05 -04:00
Yuval Peress 1f39e9e504 rtio: Update documentation
Revise the documentation around canceling pending SQEs.

Signed-off-by: Yuval Peress <peress@google.com>
2023-07-28 11:52:07 -04:00
Tom Burdick 34a24ec4cd docs: RTIO documentation updates
Updates docs to account for the large number of changes that have
occured since the initial documentation was written.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-07-20 12:00:50 -04:00
Yuval Peress 06d4a8be26 rtio: add mempool documentation
Add documentation about the mempool feature along with a few examples

Signed-off-by: Yuval Peress <peress@google.com>
2023-04-12 13:29:11 -04:00
Tom Burdick 3d2ead38cb rtio: Real-Time Input/Output Stream
A DMA friendly Stream API for zephyr. Based on ideas from io_uring
and iio, a queue based API for I/O operations.

Provides a pair of fixed length ringbuffer backed queues for submitting
I/O requests and recieving I/O completions. The requests may be chained
together to ensure the next operation does not start until the current
one is complete.

Requests target an abstract rtio_iodev which is expected to wrap all
the hardware particulars of how to perform the operation. For example
with a SPI bus device, a description of what a read, and write mean
can be decided by the iodev wrapping a particular device
hanging off of a SPI controller.

The queue pair are submitted to an executor which may be a simple
inplace looping executor done in the callers execution context
(thread/stack) but other executors are expected. A threadpool executor
might for example allow for concurrent request chains to execute in
parallel. A DMA executor, in conjunction with DMA aware iodevs
would allow for hardware offloading of operations going so far as to
schedule with priority using hardware arbitration.

Both the iodev and executor are definable by a particular
SoC, meaning they can work in conjuction to perform IO operations
using a particular DMA controller or methodology if desired.

The application decides entirely how large the queues are, where
the buffers to read/write come from (some executors
may have particular demands!), and which executor to submit
requests to.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-06-28 13:53:13 -04:00