Function sq_ring_needs_enter [src]
Returns true if we are not using an SQ thread (thus nobody submits but us),
or if IORING_SQ_NEED_WAKEUP is set and the SQ thread must be explicitly awakened.
For the latter case, we set the SQ thread wakeup flag.
Matches the implementation of sq_ring_needs_enter() in liburing.
Prototype
pub fn sq_ring_needs_enter(self: *IoUring, flags: *u32) bool
Parameters
self: *IoUring
flags: *u32
Source
pub fn sq_ring_needs_enter(self: *IoUring, flags: *u32) bool {
assert(flags.* == 0);
if ((self.flags & linux.IORING_SETUP_SQPOLL) == 0) return true;
if ((@atomicLoad(u32, self.sq.flags, .unordered) & linux.IORING_SQ_NEED_WAKEUP) != 0) {
flags.* |= linux.IORING_ENTER_SQ_WAKEUP;
return true;
}
return false;
}