11 printf(
"setting up ring test...\n");
16 printf(
"failed to set up ring\n");
22 printf(
"pushing nop sqe to ring %llu...\n", ring.
id);
26 printf(
"pushing nop sqe to ring %llu...\n", ring.
id);
30 printf(
"entering ring...\n");
33 printf(
"failed to enter ring\n");
51 printf(
"reg[%llu]: %llu\n", i, ring.
ctrl->regs[i]);
54 printf(
"tearing down ring...\n");
#define IO_OP_NOP
No-op operation.
#define SQE_REG0
The first register.
#define SQE_REGS_MAX
The maximum number of registers.
#define SQE_CREATE(_op, _flags, _timeout, _data)
Macro to create an asynchronous submission queue entry (SQE).
#define SQE_SAVE
The offset to specify the register to save the result into.
#define errno
Error number variable.
uint64_t ioring_enter(ioring_id_t id, size_t amount, size_t wait)
System call to notify the kernel of new submission queue entries (SQEs).
uint64_t ioring_teardown(ioring_id_t id)
System call to deinitialize the I/O ring.
uint64_t ioring_id_t
I/O ring ID type.
static bool sqe_push(ioring_t *ring, sqe_t *sqe)
Pushes a submission queue entry (SQE) to the submission queue.
static bool cqe_pop(ioring_t *ring, cqe_t *cqe)
Pops a completion queue entry (CQE) from the completion queue.
ioring_id_t ioring_setup(ioring_t *ring, void *address, size_t sentries, size_t centries)
System call to initialize the I/O ring.
#define NULL
Pointer error value.
#define ERR
Integer error value.
_PUBLIC int printf(const char *_RESTRICT format,...)
_PUBLIC char * strerror(int errnum)
_PUBLIC void * memset(void *s, int c, size_t n)
Asynchronous completion queue entry (CQE).
errno_t error
Error code, if not equal to EOK an error occurred.
io_op_t op
The operation that was performed.
void * data
Private data from the submission entry.
ioring_ctrl_t * ctrl
Pointer to the shared control structure.
ioring_id_t id
The ID of the ring.
Asynchronous submission queue entry (SQE).