mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
Use load relaxed semantics when reading the SQPOLL wakeup flag
This commit is contained in:
parent
69a55fc560
commit
3d2de6cfba
@ -241,7 +241,7 @@ pub const IO_Uring = struct {
|
||||
pub fn sq_ring_needs_enter(self: *IO_Uring, submitted: u32, flags: *u32) bool {
|
||||
assert(flags.* == 0);
|
||||
if ((self.flags & linux.IORING_SETUP_SQPOLL) == 0 and submitted > 0) return true;
|
||||
if ((@atomicLoad(u32, self.sq.flags, .Acquire) & linux.IORING_SQ_NEED_WAKEUP) != 0) {
|
||||
if ((@atomicLoad(u32, self.sq.flags, .Unordered) & linux.IORING_SQ_NEED_WAKEUP) != 0) {
|
||||
flags.* |= linux.IORING_ENTER_SQ_WAKEUP;
|
||||
return true;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user