Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
work.h File Reference
#include <stdint.h>
#include <zephyr/device.h>
#include <zephyr/rtio/rtio.h>
#include <zephyr/sys/p4wq.h>

Go to the source code of this file.

Data Structures

struct  rtio_work_req
 RTIO Work request. More...
 

Typedefs

typedef void(* rtio_work_submit_t) (struct rtio_iodev_sqe *iodev_sqe)
 Callback API to execute work operation.
 

Functions

struct rtio_work_reqrtio_work_req_alloc (void)
 Allocate item to perform an RTIO work request.
 
void rtio_work_req_submit (struct rtio_work_req *req, struct rtio_iodev_sqe *iodev_sqe, rtio_work_submit_t handler)
 Submit RTIO work request.
 
uint32_t rtio_work_req_used_count_get (void)
 Obtain number of currently used items from the pre-allocated pool.
 

Typedef Documentation

◆ rtio_work_submit_t

typedef void(* rtio_work_submit_t) (struct rtio_iodev_sqe *iodev_sqe)

Callback API to execute work operation.

Parameters
iodev_sqeAssociated SQE operation.

Function Documentation

◆ rtio_work_req_alloc()

struct rtio_work_req * rtio_work_req_alloc ( void )

Allocate item to perform an RTIO work request.

This allocation utilizes its internal memory slab with pre-allocated elements.

Returns
Pointer to allocated item if successful.
NULL if allocation failed.

◆ rtio_work_req_submit()

void rtio_work_req_submit ( struct rtio_work_req * req,
struct rtio_iodev_sqe * iodev_sqe,
rtio_work_submit_t handler )

Submit RTIO work request.

Parameters
reqItem to fill with request information.
iodev_sqeRTIO Operation information.
handlerCallback to handler where work operation is performed.

◆ rtio_work_req_used_count_get()

uint32_t rtio_work_req_used_count_get ( void )

Obtain number of currently used items from the pre-allocated pool.

Returns
Number of used items.