Lines Matching full:rtio
11 * RTIO is a context for asynchronous batch operations using a submission and completion queue.
47 * @brief RTIO
48 * @defgroup rtio RTIO
56 * @brief RTIO Predefined Priorities
57 * @defgroup rtio_sqe_prio RTIO Priorities
58 * @ingroup rtio
83 * @brief RTIO SQE Flags
84 * @defgroup rtio_sqe_flags RTIO SQE Flags
85 * @ingroup rtio
112 * @brief The buffer should be allocated by the RTIO mempool
115 * enabled and the RTIO context was created via the RTIO_DEFINE_WITH_MEMPOOL()
148 * @brief RTIO CQE Flags
149 * @defgroup rtio_cqe_flags RTIO CQE Flags
150 * @ingroup rtio
155 * @brief The entry's buffer was allocated from the RTIO's mempool
265 struct rtio;
277 * @param r RTIO context being used with the callback
281 typedef void (*rtio_callback_t)(struct rtio *r, const struct rtio_sqe *sqe, void *arg0);
386 * @brief An RTIO context containing what can be viewed as a pair of queues.
391 * The rtio executor along with any objects implementing the rtio_iodev interface are
396 struct rtio { struct
440 /** The memory partition associated with all RTIO context information */
444 * @brief Get the mempool block size of the RTIO context
446 * @param[in] r The RTIO context
450 static inline size_t rtio_mempool_block_size(const struct rtio *r) in rtio_mempool_block_size() argument
466 * @param[in] r RTIO context
471 static inline uint16_t __rtio_compute_mempool_block_index(const struct rtio *r, const void *ptr) in __rtio_compute_mempool_block_index()
496 struct rtio *r;
500 * @brief API that an RTIO IO device should implement
766 static inline int rtio_block_pool_alloc(struct rtio *r, size_t min_sz, in rtio_block_pool_alloc()
807 static inline void rtio_block_pool_free(struct rtio *r, void *buf, uint32_t buf_len) in rtio_block_pool_free()
824 * @brief Statically define and initialize an RTIO IODev
888 STRUCT_SECTION_ITERABLE(rtio, name) = { \
902 * @brief Statically define and initialize an RTIO context
904 * @param name Name of the RTIO
917 * @brief Statically define and initialize an RTIO context
919 * @param name Name of the RTIO
937 * @param r RTIO context
941 static inline uint32_t rtio_sqe_acquirable(struct rtio *r) in rtio_sqe_acquirable()
997 * @param r RTIO context
1002 static inline struct rtio_sqe *rtio_sqe_acquire(struct rtio *r) in rtio_sqe_acquire()
1018 * @param r RTIO context
1020 static inline void rtio_sqe_drop_all(struct rtio *r) in rtio_sqe_drop_all()
1035 static inline struct rtio_cqe *rtio_cqe_acquire(struct rtio *r) in rtio_cqe_acquire()
1051 static inline void rtio_cqe_produce(struct rtio *r, struct rtio_cqe *cqe) in rtio_cqe_produce()
1062 * @param r RTIO context
1067 static inline struct rtio_cqe *rtio_cqe_consume(struct rtio *r) in rtio_cqe_consume()
1093 * @param r RTIO context
1097 static inline struct rtio_cqe *rtio_cqe_consume_block(struct rtio *r) in rtio_cqe_consume_block()
1118 * @param r RTIO context
1121 static inline void rtio_cqe_release(struct rtio *r, struct rtio_cqe *cqe) in rtio_cqe_release()
1138 struct rtio *r = iodev_sqe->r; in rtio_cqe_compute_flags()
1156 * If the RTIO context contains a memory pool, and the SQE was created by calling
1160 * @param[in] r RTIO context
1168 __syscall int rtio_cqe_get_mempool_buffer(const struct rtio *r, struct rtio_cqe *cqe,
1171 static inline int z_impl_rtio_cqe_get_mempool_buffer(const struct rtio *r, struct rtio_cqe *cqe, in z_impl_rtio_cqe_get_mempool_buffer()
1198 void rtio_executor_submit(struct rtio *r);
1234 * @param r RTIO context
1239 static inline void rtio_cqe_submit(struct rtio *r, int result, void *userdata, uint32_t flags) in rtio_cqe_submit()
1287 struct rtio *r = iodev_sqe->r; in rtio_sqe_rx_buf()
1321 * @brief Release memory that was allocated by the RTIO's memory pool
1323 * If the RTIO context was created by a call to RTIO_DEFINE_WITH_MEMPOOL(), then the cqe data might
1324 * contain a buffer that's owned by the RTIO context. In those cases (if the read request was
1328 * actually belongs to the RTIO context and will ignore invalid arguments.
1330 * @param r RTIO context
1334 __syscall void rtio_release_buffer(struct rtio *r, void *buff, uint32_t buff_len);
1336 static inline void z_impl_rtio_release_buffer(struct rtio *r, void *buff, uint32_t buff_len) in z_impl_rtio_release_buffer()
1352 * Grant access to an RTIO context to a user thread
1354 static inline void rtio_access_grant(struct rtio *r, struct k_thread *t) in rtio_access_grant()
1394 * Copies one or more SQEs into the RTIO context and optionally returns their generated SQE handles.
1397 * @param[in] r RTIO context
1406 __syscall int rtio_sqe_copy_in_get_handles(struct rtio *r, const struct rtio_sqe *sqes,
1409 static inline int z_impl_rtio_sqe_copy_in_get_handles(struct rtio *r, const struct rtio_sqe *sqes, in z_impl_rtio_sqe_copy_in_get_handles()
1436 * RTIO is used from user mode where a copy must be made.
1441 * @param r RTIO context
1448 static inline int rtio_sqe_copy_in(struct rtio *r, const struct rtio_sqe *sqes, size_t sqe_count) in rtio_sqe_copy_in()
1456 * Copies from the RTIO context and its queue completion queue
1460 * @param r RTIO context
1468 __syscall int rtio_cqe_copy_out(struct rtio *r,
1472 static inline int z_impl_rtio_cqe_copy_out(struct rtio *r, in z_impl_rtio_cqe_copy_out()
1503 * @param r RTIO context
1508 __syscall int rtio_submit(struct rtio *r, uint32_t wait_count);
1510 static inline int z_impl_rtio_submit(struct rtio *r, uint32_t wait_count) in z_impl_rtio_submit()
1519 "expected rtio submit with wait count to be called from a thread"); in z_impl_rtio_submit()
1562 #include <zephyr/syscalls/rtio.h>