Updates registered file descriptors.
Updates are applied starting at the provided offset in the original file descriptors slice. There are three kind of updates:
register_files.pub fn register_files_update(self: *IoUring, offset: u32, fds: []const linux.fd_t) !void
pub fn register_files_update(self: *IoUring, offset: u32, fds: []const linux.fd_t) !void {
assert(self.fd >= 0);
const FilesUpdate = extern struct {
offset: u32,
resv: u32,
fds: u64 align(8),
};
var update = FilesUpdate{
.offset = offset,
.resv = @as(u32, 0),
.fds = @as(u64, @intFromPtr(fds.ptr)),
};
const res = linux.io_uring_register(
self.fd,
.REGISTER_FILES_UPDATE,
@as(*const anyopaque, @ptrCast(&update)),
@as(u32, @intCast(fds.len)),
);
try handle_registration_result(res);
}