mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 14:25:16 +00:00
linux/io_uring_sqe: add prep_files_update
This commit is contained in:
parent
ecfd9cef7d
commit
6f6b85e298
@ -525,6 +525,21 @@ pub const io_uring_sqe = extern struct {
|
||||
sqe.rw_flags = flags;
|
||||
}
|
||||
|
||||
pub fn prep_files_update(
|
||||
sqe: *linux.io_uring_sqe,
|
||||
fds: []const linux.fd_t,
|
||||
offset: u32,
|
||||
) void {
|
||||
sqe.prep_rw(.FILES_UPDATE, -1, @intFromPtr(fds.ptr), fds.len, @intCast(offset));
|
||||
}
|
||||
|
||||
pub fn prep_files_update_alloc(
|
||||
sqe: *linux.io_uring_sqe,
|
||||
fds: []linux.fd_t,
|
||||
) void {
|
||||
sqe.prep_rw(.FILES_UPDATE, -1, @intFromPtr(fds.ptr), fds.len, linux.IORING_FILE_INDEX_ALLOC);
|
||||
}
|
||||
|
||||
pub fn prep_provide_buffers(
|
||||
sqe: *linux.io_uring_sqe,
|
||||
buffers: [*]u8,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user