6#include <sys/syscall.h>
38 if (!r || entries == 0)
return -1;
52 r->entries =
p.sq_entries;
61 r->sq_ring_sz =
sq_sz;
99 if (!r || !r->active)
return false;
104 if (tail -
head >= r->entries) {
117 sqe->user_data = user_data;
134 if (!r || !r->active)
return;
135 if (r->sqes && r->sqes_sz) {
136 munmap(r->sqes, r->sqes_sz);
138 if (r->sq_head && r->sq_ring_sz) {
139 munmap((
void *)r->sq_head, r->sq_ring_sz);
141 if (r->ring_fd >= 0) {
Zero-syscall I/O engine powered by Linux io_uring SQPOLL.