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.

fanotify_mark

linux.fanotify_mark
pub fn fanotify_mark(
    fd: fd_t,
    flags: fanotify.MarkFlags,
    mask: fanotify.MarkMask,
    dirfd: fd_t,
    pathname: ?[*:0]const u8,
) usize

File

lib/std/os/linux.zig:1065

Code

pub fn fanotify_mark(
    fd: fd_t,
    flags: fanotify.MarkFlags,
    mask: fanotify.MarkMask,
    dirfd: fd_t,
    pathname: ?[*:0]const u8,
) usize {
    if (@sizeOf(syscall_arg_t) < @sizeOf(u64)) {
        const mask_halves = splitValue64(@bitCast(mask));
        return syscall6(
            .fanotify_mark,
            @as(u32, @bitCast(fd)),
            @as(u32, @bitCast(flags)),
            mask_halves[0],
            mask_halves[1],
            @as(u32, @bitCast(dirfd)),
            @intFromPtr(pathname),
        );
    } else {
        return syscall5(
            .fanotify_mark,
            @as(u32, @bitCast(fd)),
            @as(u32, @bitCast(flags)),
            @as(u64, @bitCast(mask)),
            @as(u32, @bitCast(dirfd)),
            @intFromPtr(pathname),
        );
    }
}