private CompletionQueue(uint *head, uint *tail, uint *ringMask, uint *ringEntries, uint *overflow, io_uring_cqe *cqes) { _head = head; _tail = tail; _ringMask = ringMask; _ringEntries = ringEntries; _overflow = overflow; _cqes = cqes; _headInternal = head; _tailInternal = tail; }
public CompletionQueue(int ringFd, void *ringBase, io_cqring_offsets *offsets, bool ioPolled) { _ringFd = ringFd; _head = Add <uint>(ringBase, offsets->head); _tail = Add <uint>(ringBase, offsets->tail); _ringMask = *Add <uint>(ringBase, offsets->ring_mask); _ringEntries = *Add <uint>(ringBase, offsets->ring_entries); _overflow = Add <uint>(ringBase, offsets->overflow); _cqes = Add <io_uring_cqe>(ringBase, offsets->cqes); _ioPolled = ioPolled; _headInternal = _head; _tailInternal = _tail; }
internal static unsafe Completion FromCqe(io_uring_cqe *cqe) { return(Unsafe.AsRef <Completion>(cqe)); }