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 library itself.

pwritev

linux.pwritev
pub fn pwritev(fd: fd_t, iov: [*]const iovec_const, count: usize, offset: off_t) usize

File

lib/std/os/linux.zig:1543

Code

pub fn pwritev(fd: fd_t, iov: [*]const iovec_const, count: usize, offset: off_t) usize {
    const offset_u: u64 = @bitCast(offset);
    return syscall5(
        .pwritev,
        @as(u32, @bitCast(fd)),
        @intFromPtr(iov),
        count,
        // See comments in preadv
        @truncate(offset_u),
        if (@sizeOf(syscall_arg_t) < @sizeOf(u64)) @truncate(offset_u >> 32) else 0,
    );
}