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.

syscall_lseek

x32.syscall_lseek
pub fn syscall_lseek(
    fd: std.os.linux.fd_t,
    offset: std.os.linux.off_t,
    whence: u32,
) u64

File

Code

pub fn syscall_lseek(
    fd: std.os.linux.fd_t,
    offset: std.os.linux.off_t,
    whence: u32,
) u64 {
    return asm volatile ("syscall"
        : [ret] "={rax}" (-> u64),
        : [number] "{rax}" (@backingInt(SYS.lseek)),
          [fd] "{rdi}" (@as(u32, @bitCast(fd))),
          [offset] "{rsi}" (@as(u64, @bitCast(offset))),
          [whence] "{rdx}" (whence),
        : .{ .rcx = true, .r11 = true, .memory = true });
}