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.

init

A friendly way to setup an io_uring, with default linux.io_uring_params. entries must be a power of two between 1 and 32768, although the kernel will make the final call on how many entries the submission and completion queues will ultimately have, see https://github.com/torvalds/linux/blob/v5.8/fs/io_uring.c#L8027-L8050. Matches the interface of io_uring_queue_init() in liburing.

IoUring.init
pub fn init(entries: u16, flags: u32) !IoUring

File

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

Code

pub fn init(entries: u16, flags: u32) !IoUring {
    var params = std.mem.zeroInit(linux.io_uring_params, .{
        .flags = flags,
        .sq_thread_idle = 1000,
    });
    return try IoUring.init_params(entries, &params);
}