Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

cq_advance

For advanced use cases only that implement custom completion queue methods. Matches the implementation of cq_advance() in liburing.

IoUring.cq_advance
pub fn cq_advance(self: *IoUring, count: u32) void

File

lib/std/os/linux/IoUring.zig:335

Code

pub fn cq_advance(self: *IoUring, count: u32) void {
    if (count > 0) {
        // Ensure the kernel only sees the new head value after the CQEs have been read.
        @atomicStore(u32, self.cq.head, self.cq.head.* +% count, .release);
    }
}