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.

lseek

Can only be called on 64 bit systems. For 32 bit see llseek.

linux.lseek
pub fn lseek(fd: fd_t, offset: off_t, whence: u32) u64

File

lib/std/os/linux.zig:1827

Code

pub fn lseek(fd: fd_t, offset: off_t, whence: u32) u64 {
    return switch (builtin.abi) {
        .gnuabin32,
        .muslabin32,
        .abin32,
        .gnux32,
        .muslx32,
        .x32,
        => syscall_lseek(fd, offset, whence),
        else => syscall3(.lseek, @as(u32, @bitCast(fd)), @as(u64, @bitCast(offset)), whence),
    };
}