zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 3d2de6cfbacb139ee101202e786b9355be92f960 (tree)
parent 69a55fc560dab477222f2ad104050b443647faa5
Author: Joran Dirk Greef <joran@ronomon.com>
Date:   Sun,  4 Oct 2020 13:14:57 +0200

Use load relaxed semantics when reading the SQPOLL wakeup flag

Diffstat:
Mlib/std/os/linux/io_uring.zig | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/std/os/linux/io_uring.zig b/lib/std/os/linux/io_uring.zig @@ -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; }