CompletionQueueRingOffsets

Field offsets used to map kernel structure to our.

C API: struct io_cqring_offsets

version(linux)
@nogc
struct CompletionQueueRingOffsets {
CQRingFlags flags;
}

Members

Variables

cqes
uint cqes;

Offset to array of completion queue entries

head
uint head;

incremented by user space after entry at head was processed. available entries for processing: head..tail

overflow
uint overflow;

incremented by the kernel every time it failed to queue a completion event because the ring was full.

ring_entries
uint ring_entries;

value same as SetupParameters.cq_entries, power of 2.

ring_mask
uint ring_mask;

value value_at(ring_entries) - 1 mask for indices at head and tail (don't delete masked bits! head and tail can point to the same entry, but if they are not exactly equal it implies the ring is full, and if they are exactly equal the ring is empty.)

tail
uint tail;

modified by kernel when new entry was created; points to next entry kernel is going to fill.

Meta