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 › preadv Public Function preadv Doc Source Public Function std.os.linux.preadv
pub fn preadv (fd : fd_t , iov : [*]const iovec , count : usize , offset : off_t ) usize Params File os/linux.zig: 1473
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486 pub fn preadv (fd : fd_t , iov : [*]const iovec , count : usize , offset : off_t ) usize {
const offset_u : u64 = @bitCast (offset );
return syscall5 (
.preadv ,
@as (u32 , @bitCast (fd )),
@intFromPtr (iov ),
count ,
// Kernel expects the offset is split into largest natural word-size.
// See following link for detail:
// https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=601cc11d054ae4b5e9b5babec3d8e4667a2cb9b5
@truncate (offset_u ),
if (@sizeOf (syscall_arg_t ) < @sizeOf (u64 )) @truncate (offset_u >> 32 ) else 0 ,
);
}