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 standard library.
std › os › linux › IoUring › register_files_sparse Public Function register_files_sparse Doc Source Public Function std.os.linux.IoUring.register_files_sparse
pub fn register_files_sparse (self : *IoUring , nr_files : u32 ) !void Params File os/linux/IoUring.zig: 1197
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216 pub fn register_files_sparse (self : *IoUring , nr_files : u32 ) !void {
assert (self .fd >= 0 );
const reg = &linux .io_uring_rsrc_register {
.nr = nr_files ,
.flags = linux .IORING_RSRC_REGISTER_SPARSE ,
.resv2 = 0 ,
.data = 0 ,
.tags = 0 ,
};
const res = linux .io_uring_register (
self .fd ,
.REGISTER_FILES2 ,
@ptrCast (reg ),
@as (u32 , @sizeOf (linux .io_uring_rsrc_register )),
);
return handle_registration_result (res );
}
Registers an empty (-1) file table of
nr_filesnumber of file descriptors.