Function init [src]
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.
Prototype
pub fn init(entries: u16, flags: u32) !IoUring
Parameters
entries: u16
flags: u32
Source
pub fn init(entries: u16, flags: u32) !IoUring {
var params = mem.zeroInit(linux.io_uring_params, .{
.flags = flags,
.sq_thread_idle = 1000,
});
return try IoUring.init_params(entries, ¶ms);
}