Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
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 standard library. Public Function

init

Public Function
std.os.linux.IoUring.init
pub fn init(entries: u16, flags: u32) !IoUring

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.

Params

  • entries: u16
  • flags: u32

File

os/linux/IoUring.zig:27
27
28
29
30
31
32
33
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);
}