Function sq_ready [src]
Returns the number of flushed and unflushed SQEs pending in the submission queue.
In other words, this is the number of SQEs in the submission queue, i.e. its length.
These are SQEs that the kernel is yet to consume.
Matches the implementation of io_uring_sq_ready in liburing.
Prototype
pub fn sq_ready(self: *IoUring) u32
Parameters
self: *IoUring
Source
pub fn sq_ready(self: *IoUring) u32 {
// Always use the shared ring state (i.e. head and not sqe_head) to avoid going out of sync,
// see https://github.com/axboe/liburing/issues/92.
return self.sq.sqe_tail -% @atomicLoad(u32, self.sq.head, .acquire);
}