| ... | @@ -38,9 +38,6 @@ pub const io_uring_sqe = extern struct { | ... | @@ -38,9 +38,6 @@ pub const io_uring_sqe = extern struct { |
| 38 | options: [2]u64 = [2]u64{ 0, 0 } | 38 | options: [2]u64 = [2]u64{ 0, 0 } |
| 39 | }; | 39 | }; |
| 40 | | 40 | |
| 41 | // TODO Add to zig/std/os/bits/linux.zig: | | |
| 42 | const IORING_SQ_CQ_OVERFLOW = 1 << 1; | | |
| 43 | | | |
| 44 | comptime { | 41 | comptime { |
| 45 | assert(@sizeOf(io_uring_params) == 120); | 42 | assert(@sizeOf(io_uring_params) == 120); |
| 46 | assert(@sizeOf(io_uring_sqe) == 64); | 43 | assert(@sizeOf(io_uring_sqe) == 64); |
| ... | @@ -315,7 +312,7 @@ pub const IO_Uring = struct { | ... | @@ -315,7 +312,7 @@ pub const IO_Uring = struct { |
| 315 | | 312 | |
| 316 | // Matches the implementation of cq_ring_needs_flush() in liburing. | 313 | // Matches the implementation of cq_ring_needs_flush() in liburing. |
| 317 | fn cq_ring_needs_flush(self: *IO_Uring) bool { | 314 | fn cq_ring_needs_flush(self: *IO_Uring) bool { |
| 318 | return (@atomicLoad(u32, self.sq.flags, .Unordered) & IORING_SQ_CQ_OVERFLOW) != 0; | 315 | return (@atomicLoad(u32, self.sq.flags, .Unordered) & linux.IORING_SQ_CQ_OVERFLOW) != 0; |
| 319 | } | 316 | } |
| 320 | | 317 | |
| 321 | /// For advanced use cases only that implement custom completion queue methods. | 318 | /// For advanced use cases only that implement custom completion queue methods. |