This file provides the system interface functions for Linux matching those that are provided by libc, whether or not libc is linked. The following abstractions are made:

  • Work around kernel bugs and limitations. For example, see sendmmsg.
  • Implement all the syscalls in the same way that libc functions will provide rename when only the renameat syscall exists.
  • Does not support POSIX thread cancellation.

Global Variables

elf_aux_maybe
?[*]std.elf.Auxv

Set by startup code, used by getauxval.

Functions

fn CPU_COUNT(set: cpu_set_t) cpu_count_t

No documentation provided.

inline fn __io_uring_prep_poll_mask(poll_mask: u32) u32

Poll masks previously used to comprise of 16 bits in the flags union of a SQE, …

Poll masks previously used to comprise of 16 bits in the flags union of a SQE, but were then extended to comprise of 32 bits in order to make room for additional option flags. To ensure that the correct bits of poll masks are consistently and properly read across multiple kernel versions, poll masks are enforced to be little-endian. https://www.spinics.net/lists/io-uring/msg02848.html

fn accept(fd: i32, addr: ?*sockaddr, len: ?*socklen_t) usize

No documentation provided.

fn accept4(fd: i32, addr: ?*sockaddr, len: ?*socklen_t, flags: u32) usize

No documentation provided.

fn access(path: [*:0]const u8, mode: u32) usize

No documentation provided.

fn bind(fd: i32, addr: *const sockaddr, len: socklen_t) usize

No documentation provided.

fn bpf(cmd: BPF.Cmd, attr: *BPF.Attr, size: u32) usize

No documentation provided.

fn capget(hdrp: *cap_user_header_t, datap: *cap_user_data_t) usize

No documentation provided.

fn capset(hdrp: *cap_user_header_t, datap: *const cap_user_data_t) usize

No documentation provided.

fn chdir(path: [*:0]const u8) usize

No documentation provided.

fn chmod(path: [*:0]const u8, mode: mode_t) usize

No documentation provided.

fn chroot(path: [*:0]const u8) usize

No documentation provided.

fn clock_getres(clk_id: i32, tp: *timespec) usize

No documentation provided.

fn clock_gettime(clk_id: i32, tp: *timespec) usize

No documentation provided.

fn clock_settime(clk_id: i32, tp: *const timespec) usize

No documentation provided.

fn clone2(flags: u32, child_stack_ptr: usize) usize

See also clone (from the arch-specific include)

fn clone5(flags: usize, child_stack_ptr: usize, parent_tid: *i32, child_tid: *i32, newtls: usize) usize

See also clone (from the arch-specific include)

fn close(fd: i32) usize

No documentation provided.

fn connect(fd: i32, addr: *const anyopaque, len: socklen_t) usize

No documentation provided.

fn copy_file_range(fd_in: fd_t, off_in: ?*i64, fd_out: fd_t, off_out: ?*i64, len: usize, flags: u32) usize

No documentation provided.

fn create(path: [*:0]const u8, perm: mode_t) usize

No documentation provided.

fn dup(old: i32) usize

No documentation provided.

fn dup2(old: i32, new: i32) usize

No documentation provided.

fn dup3(old: i32, new: i32, flags: u32) usize

No documentation provided.

fn epoll_create() usize

No documentation provided.

fn epoll_create1(flags: usize) usize

No documentation provided.

fn epoll_ctl(epoll_fd: i32, op: u32, fd: i32, ev: ?*epoll_event) usize

No documentation provided.

fn epoll_pwait(epoll_fd: i32, events: [*]epoll_event, maxevents: u32, timeout: i32, sigmask: ?*const sigset_t) usize

No documentation provided.

fn epoll_wait(epoll_fd: i32, events: [*]epoll_event, maxevents: u32, timeout: i32) usize

No documentation provided.

fn eventfd(count: u32, flags: u32) usize

No documentation provided.

fn execve(path: [*:0]const u8, argv: [*:null]const ?[*:0]const u8, envp: [*:null]const ?[*:0]const u8) usize

No documentation provided.

fn exit(status: i32) noreturn

No documentation provided.

fn exit_group(status: i32) noreturn

No documentation provided.

fn faccessat(dirfd: i32, path: [*:0]const u8, mode: u32, flags: u32) usize

No documentation provided.

fn fadvise(fd: fd_t, offset: i64, len: i64, advice: usize) usize

No documentation provided.

fn fallocate(fd: i32, mode: i32, offset: i64, length: i64) usize

No documentation provided.

fn fchdir(fd: fd_t) usize

No documentation provided.

fn fchmod(fd: i32, mode: mode_t) usize

No documentation provided.

fn fchmodat(fd: i32, path: [*:0]const u8, mode: mode_t, flags: u32) usize

No documentation provided.

fn fchown(fd: i32, owner: uid_t, group: gid_t) usize

No documentation provided.

fn fcntl(fd: fd_t, cmd: i32, arg: usize) usize

No documentation provided.

fn fdatasync(fd: fd_t) usize

No documentation provided.

fn fgetxattr(fd: usize, name: [*:0]const u8, value: [*]u8, size: usize) usize

No documentation provided.

fn flistxattr(fd: usize, list: [*]u8, size: usize) usize

No documentation provided.

fn flock(fd: fd_t, operation: i32) usize

No documentation provided.

fn fork() usize

No documentation provided.

fn fremovexattr(fd: usize, name: [*:0]const u8) usize

No documentation provided.

fn fsetxattr(fd: usize, name: [*:0]const u8, value: *const void, size: usize, flags: usize) usize

No documentation provided.

fn fstat(fd: i32, stat_buf: *Stat) usize

No documentation provided.

fn fstatat(dirfd: i32, path: [*:0]const u8, stat_buf: *Stat, flags: u32) usize

No documentation provided.

fn fsync(fd: fd_t) usize

No documentation provided.

fn ftruncate(fd: i32, length: i64) usize

No documentation provided.

fn futex_wait(uaddr: *const i32, futex_op: u32, val: i32, timeout: ?*const timespec) usize

No documentation provided.

fn futex_wake(uaddr: *const i32, futex_op: u32, val: i32) usize

No documentation provided.

fn futimens(fd: i32, times: *const [2]timespec) usize

No documentation provided.

fn getErrno(r: usize) E

Get the errno from a syscall return value, or 0 for no error.

fn getauxval(index: usize) usize

See std.elf for the constants.

fn getcwd(buf: [*]u8, size: usize) usize

No documentation provided.

fn getdents(fd: i32, dirp: [*]u8, len: usize) usize

No documentation provided.

fn getdents64(fd: i32, dirp: [*]u8, len: usize) usize

No documentation provided.

fn getegid() gid_t

No documentation provided.

fn geteuid() uid_t

No documentation provided.

fn getgid() gid_t

No documentation provided.

fn getgroups(size: usize, list: *gid_t) usize

No documentation provided.

fn getitimer(which: i32, curr_value: *itimerspec) usize

No documentation provided.

fn getpeername(fd: i32, addr: *sockaddr, len: *socklen_t) usize

No documentation provided.

fn getpid() pid_t

No documentation provided.

fn getrandom(buf: [*]u8, count: usize, flags: u32) usize

No documentation provided.

fn getresgid(rgid: *gid_t, egid: *gid_t, sgid: *gid_t) usize

No documentation provided.

fn getresuid(ruid: *uid_t, euid: *uid_t, suid: *uid_t) usize

No documentation provided.

fn getrlimit(resource: rlimit_resource, rlim: *rlimit) usize

No documentation provided.

fn getrusage(who: i32, usage: *rusage) usize

No documentation provided.

fn getsockname(fd: i32, addr: *sockaddr, len: *socklen_t) usize

No documentation provided.

fn getsockopt(fd: i32, level: u32, optname: u32, optval: [*]u8, optlen: *socklen_t) usize

No documentation provided.

fn gettid() pid_t

No documentation provided.

fn gettimeofday(tv: *timeval, tz: *timezone) usize

No documentation provided.

fn getuid() uid_t

No documentation provided.

fn getxattr(path: [*:0]const u8, name: [*:0]const u8, value: [*]u8, size: usize) usize

No documentation provided.

fn inotify_add_watch(fd: i32, pathname: [*:0]const u8, mask: u32) usize

No documentation provided.

fn inotify_init1(flags: u32) usize

No documentation provided.

fn inotify_rm_watch(fd: i32, wd: i32) usize

No documentation provided.

fn io_uring_enter(fd: i32, to_submit: u32, min_complete: u32, flags: u32, sig: ?*sigset_t) usize

No documentation provided.

fn io_uring_prep_accept(sqe: *linux.io_uring_sqe, fd: os.fd_t, addr: ?*os.sockaddr, addrlen: ?*os.socklen_t, flags: u32) void

No documentation provided.

fn io_uring_prep_cancel(sqe: *linux.io_uring_sqe, cancel_user_data: u64, flags: u32) void

No documentation provided.

fn io_uring_prep_close(sqe: *linux.io_uring_sqe, fd: os.fd_t) void

No documentation provided.

fn io_uring_prep_connect(sqe: *linux.io_uring_sqe, fd: os.fd_t, addr: *const os.sockaddr, addrlen: os.socklen_t) void

No documentation provided.

fn io_uring_prep_epoll_ctl(sqe: *linux.io_uring_sqe, epfd: os.fd_t, fd: os.fd_t, op: u32, ev: ?*linux.epoll_event) void

No documentation provided.

fn io_uring_prep_fallocate(sqe: *linux.io_uring_sqe, fd: os.fd_t, mode: i32, offset: u64, len: u64) void

No documentation provided.

fn io_uring_prep_fsync(sqe: *linux.io_uring_sqe, fd: os.fd_t, flags: u32) void

No documentation provided.

fn io_uring_prep_link_timeout(sqe: *linux.io_uring_sqe, ts: *const os.linux.kernel_timespec, flags: u32) void

No documentation provided.

fn io_uring_prep_linkat(sqe: *linux.io_uring_sqe, old_dir_fd: os.fd_t, old_path: [*:0]const u8, new_dir_fd: os.fd_t, new_path: [*:0]const u8, flags: u32) void

No documentation provided.

fn io_uring_prep_mkdirat(sqe: *linux.io_uring_sqe, dir_fd: os.fd_t, path: [*:0]const u8, mode: os.mode_t) void

No documentation provided.

fn io_uring_prep_nop(sqe: *linux.io_uring_sqe) void

No documentation provided.

fn io_uring_prep_openat(sqe: *linux.io_uring_sqe, fd: os.fd_t, path: [*:0]const u8, flags: u32, mode: os.mode_t) void

No documentation provided.

fn io_uring_prep_poll_add(sqe: *linux.io_uring_sqe, fd: os.fd_t, poll_mask: u32) void

No documentation provided.

fn io_uring_prep_poll_remove(sqe: *linux.io_uring_sqe, target_user_data: u64) void

No documentation provided.

fn io_uring_prep_poll_update(sqe: *linux.io_uring_sqe, old_user_data: u64, new_user_data: u64, poll_mask: u32, flags: u32) void

No documentation provided.

fn io_uring_prep_provide_buffers(sqe: *linux.io_uring_sqe, buffers: [*]u8, buffer_len: usize, num: usize, group_id: usize, buffer_id: usize) void

No documentation provided.

fn io_uring_prep_read(sqe: *linux.io_uring_sqe, fd: os.fd_t, buffer: []u8, offset: u64) void

No documentation provided.

fn io_uring_prep_read_fixed(sqe: *linux.io_uring_sqe, fd: os.fd_t, buffer: *os.iovec, offset: u64, buffer_index: u16) void

No documentation provided.

fn io_uring_prep_readv(sqe: *linux.io_uring_sqe, fd: os.fd_t, iovecs: []const os.iovec, offset: u64) void

No documentation provided.

fn io_uring_prep_recv(sqe: *linux.io_uring_sqe, fd: os.fd_t, buffer: []u8, flags: u32) void

No documentation provided.

fn io_uring_prep_recvmsg(sqe: *linux.io_uring_sqe, fd: os.fd_t, msg: *os.msghdr, flags: u32) void

No documentation provided.

fn io_uring_prep_remove_buffers(sqe: *linux.io_uring_sqe, num: usize, group_id: usize) void

No documentation provided.

fn io_uring_prep_renameat(sqe: *linux.io_uring_sqe, old_dir_fd: os.fd_t, old_path: [*:0]const u8, new_dir_fd: os.fd_t, new_path: [*:0]const u8, flags: u32) void

No documentation provided.

fn io_uring_prep_rw(op: linux.IORING_OP, sqe: *linux.io_uring_sqe, fd: os.fd_t, addr: u64, len: usize, offset: u64) void

No documentation provided.

fn io_uring_prep_send(sqe: *linux.io_uring_sqe, fd: os.fd_t, buffer: []const u8, flags: u32) void

No documentation provided.

fn io_uring_prep_sendmsg(sqe: *linux.io_uring_sqe, fd: os.fd_t, msg: *const os.msghdr_const, flags: u32) void

No documentation provided.

fn io_uring_prep_shutdown(sqe: *linux.io_uring_sqe, sockfd: os.socket_t, how: u32) void

No documentation provided.

fn io_uring_prep_statx(sqe: *linux.io_uring_sqe, fd: os.fd_t, path: [*:0]const u8, flags: u32, mask: u32, buf: *linux.Statx) void

No documentation provided.

fn io_uring_prep_symlinkat(sqe: *linux.io_uring_sqe, target: [*:0]const u8, new_dir_fd: os.fd_t, link_path: [*:0]const u8) void

No documentation provided.

fn io_uring_prep_timeout(sqe: *linux.io_uring_sqe, ts: *const os.linux.kernel_timespec, count: u32, flags: u32) void

No documentation provided.

fn io_uring_prep_timeout_remove(sqe: *linux.io_uring_sqe, timeout_user_data: u64, flags: u32) void

No documentation provided.

fn io_uring_prep_unlinkat(sqe: *linux.io_uring_sqe, dir_fd: os.fd_t, path: [*:0]const u8, flags: u32) void

No documentation provided.

fn io_uring_prep_write(sqe: *linux.io_uring_sqe, fd: os.fd_t, buffer: []const u8, offset: u64) void

No documentation provided.

fn io_uring_prep_write_fixed(sqe: *linux.io_uring_sqe, fd: os.fd_t, buffer: *os.iovec, offset: u64, buffer_index: u16) void

No documentation provided.

fn io_uring_prep_writev(sqe: *linux.io_uring_sqe, fd: os.fd_t, iovecs: []const os.iovec_const, offset: u64) void

No documentation provided.

fn io_uring_register(fd: i32, opcode: IORING_REGISTER, arg: ?*const anyopaque, nr_args: u32) usize

No documentation provided.

fn io_uring_setup(entries: u32, p: *io_uring_params) usize

No documentation provided.

fn ioctl(fd: fd_t, request: u32, arg: usize) usize

No documentation provided.

fn kill(pid: pid_t, sig: i32) usize

No documentation provided.

fn lgetxattr(path: [*:0]const u8, name: [*:0]const u8, value: [*]u8, size: usize) usize

No documentation provided.

fn link(oldpath: [*:0]const u8, newpath: [*:0]const u8, flags: i32) usize

No documentation provided.

fn linkat(oldfd: fd_t, oldpath: [*:0]const u8, newfd: fd_t, newpath: [*:0]const u8, flags: i32) usize

No documentation provided.

fn listen(fd: i32, backlog: u32) usize

No documentation provided.

fn listxattr(path: [*:0]const u8, list: [*]u8, size: usize) usize

No documentation provided.

fn llistxattr(path: [*:0]const u8, list: [*]u8, size: usize) usize

No documentation provided.

fn llseek(fd: i32, offset: u64, result: ?*u64, whence: usize) usize

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

fn lremovexattr(path: [*:0]const u8, name: [*:0]const u8) usize

No documentation provided.

fn lseek(fd: i32, offset: i64, whence: usize) usize

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

fn lsetxattr(path: [*:0]const u8, name: [*:0]const u8, value: *const void, size: usize, flags: usize) usize

No documentation provided.

fn lstat(pathname: [*:0]const u8, statbuf: *Stat) usize

No documentation provided.

fn madvise(address: [*]u8, len: usize, advice: u32) usize

No documentation provided.

fn memfd_create(name: [*:0]const u8, flags: u32) usize

No documentation provided.

fn mincore(address: [*]u8, len: usize, vec: [*]u8) usize

No documentation provided.

fn mkdir(path: [*:0]const u8, mode: u32) usize

No documentation provided.

fn mkdirat(dirfd: i32, path: [*:0]const u8, mode: u32) usize

No documentation provided.

fn mknod(path: [*:0]const u8, mode: u32, dev: u32) usize

No documentation provided.

fn mknodat(dirfd: i32, path: [*:0]const u8, mode: u32, dev: u32) usize

No documentation provided.

fn mmap(address: ?[*]u8, length: usize, prot: usize, flags: u32, fd: i32, offset: i64) usize

No documentation provided.

fn mount(special: [*:0]const u8, dir: [*:0]const u8, fstype: ?[*:0]const u8, flags: u32, data: usize) usize

No documentation provided.

fn mprotect(address: [*]const u8, length: usize, protection: usize) usize

No documentation provided.

fn msync(address: [*]const u8, length: usize, flags: i32) usize

No documentation provided.

fn munmap(address: [*]const u8, length: usize) usize

No documentation provided.

fn nanosleep(req: *const timespec, rem: ?*timespec) usize

No documentation provided.

fn open(path: [*:0]const u8, flags: u32, perm: mode_t) usize

No documentation provided.

fn openat(dirfd: i32, path: [*:0]const u8, flags: u32, mode: mode_t) usize

No documentation provided.

fn perf_event_open(attr: *perf_event_attr, pid: pid_t, cpu: i32, group_fd: fd_t, flags: usize) usize

No documentation provided.

fn pidfd_getfd(pidfd: fd_t, targetfd: fd_t, flags: u32) usize

No documentation provided.

fn pidfd_open(pid: pid_t, flags: u32) usize

No documentation provided.

fn pidfd_send_signal(pidfd: fd_t, sig: i32, info: ?*siginfo_t, flags: u32) usize

No documentation provided.

fn pipe(fd: *[2]i32) usize

No documentation provided.

fn pipe2(fd: *[2]i32, flags: u32) usize

No documentation provided.

fn poll(fds: [*]pollfd, n: nfds_t, timeout: i32) usize

No documentation provided.

fn ppoll(fds: [*]pollfd, n: nfds_t, timeout: ?*timespec, sigmask: ?*const sigset_t) usize

No documentation provided.

fn prctl(option: i32, arg2: usize, arg3: usize, arg4: usize, arg5: usize) usize

No documentation provided.

fn pread(fd: i32, buf: [*]u8, count: usize, offset: i64) usize

No documentation provided.

fn preadv(fd: i32, iov: [*]const iovec, count: usize, offset: i64) usize

No documentation provided.

fn preadv2(fd: i32, iov: [*]const iovec, count: usize, offset: i64, flags: kernel_rwf) usize

No documentation provided.

fn prlimit(pid: pid_t, resource: rlimit_resource, new_limit: ?*const rlimit, old_limit: ?*rlimit) usize

No documentation provided.

fn process_vm_readv(pid: pid_t, local: []iovec, remote: []const iovec_const, flags: usize) usize

No documentation provided.

fn process_vm_writev(pid: pid_t, local: []const iovec_const, remote: []const iovec_const, flags: usize) usize

No documentation provided.

fn ptrace(req: u32, pid: pid_t, addr: usize, data: usize, addr2: usize) usize

No documentation provided.

fn pwrite(fd: i32, buf: [*]const u8, count: usize, offset: i64) usize

No documentation provided.

fn pwritev(fd: i32, iov: [*]const iovec_const, count: usize, offset: i64) usize

No documentation provided.

fn pwritev2(fd: i32, iov: [*]const iovec_const, count: usize, offset: i64, flags: kernel_rwf) usize

No documentation provided.

fn read(fd: i32, buf: [*]u8, count: usize) usize

No documentation provided.

fn readlink(path: [*:0]const u8, buf_ptr: [*]u8, buf_len: usize) usize

No documentation provided.

fn readlinkat(dirfd: i32, path: [*:0]const u8, buf_ptr: [*]u8, buf_len: usize) usize

No documentation provided.

fn readv(fd: i32, iov: [*]const iovec, count: usize) usize

No documentation provided.

fn reboot(magic: LINUX_REBOOT.MAGIC1, magic2: LINUX_REBOOT.MAGIC2, cmd: LINUX_REBOOT.CMD, arg: ?*const anyopaque) usize

No documentation provided.

fn recvfrom(fd: i32, buf: [*]u8, len: usize, flags: u32, addr: ?*sockaddr, alen: ?*socklen_t) usize

No documentation provided.

fn recvmsg(fd: i32, msg: *msghdr, flags: u32) usize

No documentation provided.

fn removexattr(path: [*:0]const u8, name: [*:0]const u8) usize

No documentation provided.

fn rename(old: [*:0]const u8, new: [*:0]const u8) usize

No documentation provided.

fn renameat(oldfd: i32, oldpath: [*]const u8, newfd: i32, newpath: [*]const u8) usize

No documentation provided.

fn renameat2(oldfd: i32, oldpath: [*:0]const u8, newfd: i32, newpath: [*:0]const u8, flags: u32) usize

No documentation provided.

fn rmdir(path: [*:0]const u8) usize

No documentation provided.

fn sched_getaffinity(pid: pid_t, size: usize, set: *cpu_set_t) usize

No documentation provided.

fn sched_yield() usize

No documentation provided.

fn seccomp(operation: u32, flags: u32, args: ?*const anyopaque) usize

No documentation provided.

fn sendfile(outfd: i32, infd: i32, offset: ?*i64, count: usize) usize

No documentation provided.

fn sendmmsg(fd: i32, msgvec: [*]mmsghdr_const, vlen: u32, flags: u32) usize

No documentation provided.

fn sendmsg(fd: i32, msg: *const msghdr_const, flags: u32) usize

No documentation provided.

fn sendto(fd: i32, buf: [*]const u8, len: usize, flags: u32, addr: ?*const sockaddr, alen: socklen_t) usize

No documentation provided.

fn setegid(egid: gid_t) usize

No documentation provided.

fn seteuid(euid: uid_t) usize

No documentation provided.

fn setgid(gid: gid_t) usize

No documentation provided.

fn setgroups(size: usize, list: [*]const gid_t) usize

No documentation provided.

fn setitimer(which: i32, new_value: *const itimerspec, old_value: ?*itimerspec) usize

No documentation provided.

fn setregid(rgid: gid_t, egid: gid_t) usize

No documentation provided.

fn setresgid(rgid: gid_t, egid: gid_t, sgid: gid_t) usize

No documentation provided.

fn setresuid(ruid: uid_t, euid: uid_t, suid: uid_t) usize

No documentation provided.

fn setreuid(ruid: uid_t, euid: uid_t) usize

No documentation provided.

fn setrlimit(resource: rlimit_resource, rlim: *const rlimit) usize

No documentation provided.

fn setsockopt(fd: i32, level: u32, optname: u32, optval: [*]const u8, optlen: socklen_t) usize

No documentation provided.

fn settimeofday(tv: *const timeval, tz: *const timezone) usize

No documentation provided.

fn setuid(uid: uid_t) usize

No documentation provided.

fn setxattr(path: [*:0]const u8, name: [*:0]const u8, value: *const void, size: usize, flags: usize) usize

No documentation provided.

fn shutdown(fd: i32, how: i32) usize

No documentation provided.

fn sigaction(sig: u6, act: ?*const Sigaction, oact: ?*Sigaction) usize

No documentation provided.

fn sigaddset(set: *sigset_t, sig: u6) void

No documentation provided.

fn sigaltstack(ss: ?*stack_t, old_ss: ?*stack_t) usize

No documentation provided.

fn sigismember(set: *const sigset_t, sig: u6) bool

No documentation provided.

fn signalfd(fd: fd_t, mask: *const sigset_t, flags: u32) usize

No documentation provided.

fn sigprocmask(flags: u32, set: ?*const sigset_t, oldset: ?*sigset_t) usize

No documentation provided.

fn socket(domain: u32, socket_type: u32, protocol: u32) usize

No documentation provided.

fn socketpair(domain: i32, socket_type: i32, protocol: i32, fd: *[2]i32) usize

No documentation provided.

fn stat(pathname: [*:0]const u8, statbuf: *Stat) usize

No documentation provided.

fn statx(dirfd: i32, path: [*]const u8, flags: u32, mask: u32, statx_buf: *Statx) usize

No documentation provided.

fn symlink(existing: [*:0]const u8, new: [*:0]const u8) usize

No documentation provided.

fn symlinkat(existing: [*:0]const u8, newfd: i32, newpath: [*:0]const u8) usize

No documentation provided.

fn sync() void

No documentation provided.

fn syncfs(fd: fd_t) usize

No documentation provided.

fn tcdrain(fd: fd_t) usize

No documentation provided.

fn tcgetattr(fd: fd_t, termios_p: *termios) usize

No documentation provided.

fn tcgetpgrp(fd: fd_t, pgrp: *pid_t) usize

No documentation provided.

fn tcsetattr(fd: fd_t, optional_action: TCSA, termios_p: *const termios) usize

No documentation provided.

fn tcsetpgrp(fd: fd_t, pgrp: *const pid_t) usize

No documentation provided.

fn tgkill(tgid: pid_t, tid: pid_t, sig: i32) usize

No documentation provided.

fn timerfd_create(clockid: i32, flags: u32) usize

No documentation provided.

fn timerfd_gettime(fd: i32, curr_value: *itimerspec) usize

No documentation provided.

fn timerfd_settime(fd: i32, flags: u32, new_value: *const itimerspec, old_value: ?*itimerspec) usize

No documentation provided.

fn tkill(tid: pid_t, sig: i32) usize

No documentation provided.

fn umount(special: [*:0]const u8) usize

No documentation provided.

fn umount2(special: [*:0]const u8, flags: u32) usize

No documentation provided.

fn uname(uts: *utsname) usize

No documentation provided.

fn unlink(path: [*:0]const u8) usize

No documentation provided.

fn unlinkat(dirfd: i32, path: [*:0]const u8, flags: u32) usize

No documentation provided.

fn unshare(flags: usize) usize

No documentation provided.

fn utimensat(dirfd: i32, path: ?[*:0]const u8, times: *const [2]timespec, flags: u32) usize

No documentation provided.

inline fn vfork() usize

This must be inline, and inline call the syscall function, because if the child…

This must be inline, and inline call the syscall function, because if the child does a return it will clobber the parent’s stack. It is advised to avoid this function and use clone instead, because the compiler is not aware of how vfork affects control flow and you may see different results in optimized builds.

fn wait4(pid: pid_t, status: *u32, flags: u32, usage: ?*rusage) usize

No documentation provided.

fn waitid(id_type: P, id: i32, infop: *siginfo_t, flags: u32) usize

No documentation provided.

fn waitpid(pid: pid_t, status: *u32, flags: u32) usize

No documentation provided.

fn write(fd: i32, buf: [*]const u8, count: usize) usize

No documentation provided.

fn writev(fd: i32, iov: [*]const iovec_const, count: usize) usize

No documentation provided.

Values

ARCH
undefined
B0
comptime_int
B1000000
comptime_int
B110
comptime_int
B115200
comptime_int
B1152000
comptime_int
B1200
comptime_int
B134
comptime_int
B150
comptime_int
B1500000
comptime_int
B1800
comptime_int
B19200
comptime_int
B200
comptime_int
B2000000
comptime_int
B230400
comptime_int
B2400
comptime_int
B2500000
comptime_int
B300
comptime_int
B3000000
comptime_int
B3500000
comptime_int
B38400
comptime_int
B4000000
comptime_int
B460800
comptime_int
B4800
comptime_int
B50
comptime_int
B500000
comptime_int
B57600
comptime_int
B576000
comptime_int
B600
comptime_int
B75
comptime_int
B921600
comptime_int
B9600
comptime_int
BOTHER
comptime_int
BRKINT
tcflag_t
CLOCAL
tcflag_t
CPU_SETSIZE
comptime_int
CREAD
tcflag_t
CS5
tcflag_t
CS6
tcflag_t
CS7
tcflag_t
CS8
tcflag_t
CSIGNAL
comptime_int
CSIZE
tcflag_t
CSTOPB
tcflag_t
E
type
ECHO
tcflag_t
ECHOE
tcflag_t
ECHOK
tcflag_t
ECHONL
tcflag_t
Elf_Symndx
undefined
F
undefined
FD_CLOEXEC
comptime_int
F_OK
comptime_int
Flock
undefined
HOST_NAME_MAX
comptime_int
HUGETLB_FLAG_ENCODE_16GB
type
HUGETLB_FLAG_ENCODE_16MB
type
HUGETLB_FLAG_ENCODE_1GB
type
HUGETLB_FLAG_ENCODE_1MB
type
HUGETLB_FLAG_ENCODE_256MB
type
HUGETLB_FLAG_ENCODE_2GB
type
HUGETLB_FLAG_ENCODE_2MB
type
HUGETLB_FLAG_ENCODE_32MB
type
HUGETLB_FLAG_ENCODE_512KB
type
HUGETLB_FLAG_ENCODE_512MB
type
HUGETLB_FLAG_ENCODE_64KB
type
HUGETLB_FLAG_ENCODE_8MB
type
HUGETLB_FLAG_ENCODE_MASK
comptime_int
HUGETLB_FLAG_ENCODE_SHIFT
comptime_int
HUPCL
tcflag_t
HWCAP
undefined
ICANON
tcflag_t
ICRNL
tcflag_t
IEXTEN
tcflag_t
IFNAMESIZE
comptime_int
IGNBRK
tcflag_t
IGNCR
tcflag_t
IGNPAR
tcflag_t
IMAXBEL
tcflag_t
INLCR
tcflag_t
INPCK
tcflag_t
IORING_ACCEPT_MULTISHOT
type

accept flags stored in sqe->ioprio

IORING_ASYNC_CANCEL_ALL
type

Cancel all requests that match the given key

IORING_ASYNC_CANCEL_ANY
type

Match any request

IORING_ASYNC_CANCEL_FD
type

Key off ‘fd’ for cancelation rather than the request ‘user_data’.

IORING_CQE_F_BUFFER
type

If set, the upper 16 bits are the buffer ID

IORING_CQE_F_MORE
type

If set, parent SQE will generate more CQE entries. Available since Linux 5.13.

IORING_CQE_F_NOTIF
type

Set for notification CQEs. Can be used to distinct them from sends.

IORING_CQE_F_SOCK_NONEMPTY
type

If set, more data to read after socket recv

IORING_ENTER_EXT_ARG
type
IORING_ENTER_GETEVENTS
type
IORING_ENTER_REGISTERED_RING
type
IORING_ENTER_SQ_WAIT
type
IORING_ENTER_SQ_WAKEUP
type
IORING_FEAT_CQE_SKIP
type
IORING_FEAT_CUR_PERSONALITY
type
IORING_FEAT_EXT_ARG
type
IORING_FEAT_FAST_POLL
type
IORING_FEAT_LINKED_FILE
type
IORING_FEAT_NATIVE_WORKERS
type
IORING_FEAT_NODROP
type
IORING_FEAT_POLL_32BITS
type
IORING_FEAT_RSRC_TAGS
type
IORING_FEAT_RW_CUR_POS
type
IORING_FEAT_SINGLE_MMAP
type
IORING_FEAT_SQPOLL_NONFIXED
type
IORING_FEAT_SUBMIT_STABLE
type
IORING_FSYNC_DATASYNC
type
IORING_LINK_TIMEOUT_UPDATE
type
IORING_OFF_CQ_RING
comptime_int
IORING_OFF_SQES
comptime_int
IORING_OFF_SQ_RING
comptime_int

Magic offsets for the application to mmap the data it needs

IORING_POLL_ADD_MULTI
type

Multishot poll. Sets IORING_CQE_F_MORE if the poll handler will continue to repo…

IORING_POLL_UPDATE_EVENTS
type

Update existing poll request, matching sqe->addr as the old user_data field.

IORING_POLL_UPDATE_USER_DATA
type
IORING_RECVSEND_POLL_FIRST
type

If set, instead of first attempting to send or receive and arm poll if that yiel…

IORING_RECV_MULTISHOT
type

Multishot recv. Sets IORING_CQE_F_MORE if the handler will continue to report CQ…

IORING_SETUP_ATTACH_WQ
type

attach to existing wq

IORING_SETUP_CLAMP
type

clamp SQ/CQ ring sizes

IORING_SETUP_COOP_TASKRUN
type

Cooperative task running. When requests complete, they often require forcing th…

IORING_SETUP_CQE32
type

CQEs are 32 byte

IORING_SETUP_CQSIZE
type

app defines CQ size

IORING_SETUP_IOPOLL
type

io_context is polled

IORING_SETUP_R_DISABLED
type

start with ring disabled

IORING_SETUP_SQE128
type

SQEs are 128 byte

IORING_SETUP_SQPOLL
type

SQ poll thread

IORING_SETUP_SQ_AFF
type

sq_thread_cpu is valid

IORING_SETUP_SUBMIT_ALL
type

continue submit on error

IORING_SETUP_TASKRUN_FLAG
type

If COOP_TASKRUN is set, get notified if task work is available for running and …

IORING_SPLICE_F_FD_IN_FIXED
type
IORING_SQ_CQ_OVERFLOW
type

kernel has cqes waiting beyond the cq ring

IORING_SQ_NEED_WAKEUP
type

needs io_uring_enter wakeup

IORING_SQ_TASKRUN
type

task should enter the kernel

IORING_TIMEOUT_ABS
type
IORING_TIMEOUT_BOOTTIME
type
IORING_TIMEOUT_CLOCK_MASK
type
IORING_TIMEOUT_ETIME_SUCCESS
type
IORING_TIMEOUT_REALTIME
type
IORING_TIMEOUT_UPDATE
type
IORING_TIMEOUT_UPDATE_MASK
type
IOSQE_ASYNC
type

always go async

IOSQE_BUFFER_SELECT
type

select buffer from buf_group

IOSQE_CQE_SKIP_SUCCESS
type

don’t post CQE if request succeeded Available since Linux 5.17

IOSQE_FIXED_FILE
type

use fixed fileset

IOSQE_IO_DRAIN
type

issue after inflight IO

IOSQE_IO_HARDLINK
type

like LINK, but stronger

IOSQE_IO_LINK
type

links next sqe

IOV_MAX
comptime_int
IO_URING_OP_SUPPORTED
type
IPPORT_RESERVED
comptime_int
ISIG
tcflag_t
ISTRIP
tcflag_t
IUCLC
tcflag_t
IUTF8
tcflag_t
IXANY
tcflag_t
IXOFF
tcflag_t
IXON
tcflag_t
LOCK
undefined
MAX_ADDR_LEN
comptime_int

Largest hardware address length e.g. a mac address is a type of hardware addres…

MINSIGSTKSZ
type
MMAP2_UNIT
undefined
NAME_MAX
comptime_int
NCCS
comptime_int
NLM_F_ACK
comptime_int

Reply with ack, with zero or error code

NLM_F_ACK_TLVS
comptime_int

extended ACK TVLs were included

NLM_F_APPEND
comptime_int

Add to end of list

NLM_F_ATOMIC
comptime_int

atomic GET

NLM_F_CAPPED
comptime_int

request was capped

NLM_F_CREATE
comptime_int

Create, if it does not exist

NLM_F_DUMP
type
NLM_F_DUMP_FILTERED
comptime_int

Dump was filtered as requested

NLM_F_DUMP_INTR
comptime_int

Dump was inconsistent due to sequence change

NLM_F_ECHO
comptime_int

Echo this request

NLM_F_EXCL
comptime_int

Do not touch, if it exists

NLM_F_MATCH
comptime_int

return all matching

NLM_F_MULTI
comptime_int

Multipart message, terminated by NLMSG_DONE

NLM_F_NONREC
comptime_int

Do not delete recursively

NLM_F_REPLACE
comptime_int

Override existing

NLM_F_REQUEST
comptime_int

It is request message.

NLM_F_ROOT
comptime_int

specify tree root

NOFLSH
tcflag_t
NSIG
type

NSIG is the total number of signals defined. As signal numbers are sequential, …

OCRNL
tcflag_t
OFDEL
tcflag_t
OFILL
tcflag_t
OLCUC
tcflag_t
ONLCR
tcflag_t
ONLRET
tcflag_t
ONOCR
tcflag_t
OPOST
tcflag_t
PARENB
tcflag_t
PARMRK
tcflag_t
PARODD
tcflag_t
PATH_MAX
comptime_int
POSIX_FADV
type
REG
undefined
R_OK
comptime_int
SA
type
SC
undefined
SECBIT_KEEP_CAPS
undefined
SECBIT_KEEP_CAPS_LOCKED
undefined
SECBIT_NOROOT
undefined
SECBIT_NOROOT_LOCKED
undefined
SECBIT_NO_CAP_AMBIENT_RAISE
undefined
SECBIT_NO_CAP_AMBIENT_RAISE_LOCKED
undefined
SECBIT_NO_SETUID_FIXUP
undefined
SECBIT_NO_SETUID_FIXUP_LOCKED
undefined
SECUREBITS_DEFAULT
comptime_int
SECURE_ALL_BITS
type
SECURE_ALL_LOCKS
type
SECURE_KEEP_CAPS
comptime_int
SECURE_KEEP_CAPS_LOCKED
comptime_int
SECURE_NOROOT
comptime_int
SECURE_NOROOT_LOCKED
comptime_int
SECURE_NO_CAP_AMBIENT_RAISE
comptime_int
SECURE_NO_CAP_AMBIENT_RAISE_LOCKED
comptime_int
SECURE_NO_SETUID_FIXUP
comptime_int
SECURE_NO_SETUID_FIXUP_LOCKED
comptime_int
SIG
type
SIGSTKSZ
type
SIOCGIFINDEX
comptime_int
SOMAXCONN
comptime_int
SS_AUTODISARM
type
SS_DISABLE
comptime_int
SS_ONSTACK
comptime_int
STATX_ATIME
comptime_int
STATX_ATTR_APPEND
comptime_int
STATX_ATTR_AUTOMOUNT
comptime_int
STATX_ATTR_COMPRESSED
comptime_int
STATX_ATTR_ENCRYPTED
comptime_int
STATX_ATTR_IMMUTABLE
comptime_int
STATX_ATTR_NODUMP
comptime_int
STATX_BASIC_STATS
comptime_int
STATX_BLOCKS
comptime_int
STATX_BTIME
comptime_int
STATX_CTIME
comptime_int
STATX_GID
comptime_int
STATX_INO
comptime_int
STATX_MODE
comptime_int
STATX_MTIME
comptime_int
STATX_NLINK
comptime_int
STATX_SIZE
comptime_int
STATX_TYPE
comptime_int
STATX_UID
comptime_int
STDERR_FILENO
comptime_int
STDIN_FILENO
comptime_int
STDOUT_FILENO
comptime_int
SYS
type
Stat
undefined
TCPI_OPT_ECN
comptime_int

ECN was negotiated at TCP session init

TCPI_OPT_ECN_SEEN
comptime_int

we received at least one packet with ECT

TCPI_OPT_SACK
comptime_int
TCPI_OPT_SYN_DATA
comptime_int

SYN-ACK acked data in SYN sent or rcvd

TCPI_OPT_TIMESTAMPS
comptime_int

for TCP_INFO socket option

TCPI_OPT_WSCALE
comptime_int
TOSTOP
tcflag_t
UMOUNT_NOFOLLOW
comptime_int
V
type
VDSO
undefined
VFS_CAP_FLAGS_EFFECTIVE
comptime_int
VFS_CAP_FLAGS_MASK
type
VFS_CAP_REVISION
comptime_int
VFS_CAP_REVISION_1
comptime_int
VFS_CAP_REVISION_2
comptime_int
VFS_CAP_REVISION_MASK
comptime_int
VFS_CAP_REVISION_SHIFT
comptime_int
VFS_CAP_U32
comptime_int
VFS_CAP_U32_1
comptime_int
VFS_CAP_U32_2
comptime_int
VT0
tcflag_t
VT1
tcflag_t
VTDLY
tcflag_t
W_OK
comptime_int
XATTR_CAPS_SZ
type
XATTR_CAPS_SZ_1
type
XATTR_CAPS_SZ_2
type
XSK_UNALIGNED_BUF_ADDR_MASK
type
XSK_UNALIGNED_BUF_OFFSET_SHIFT
comptime_int
X_OK
comptime_int
all_mask
sigset_t
app_mask
sigset_t
blkcnt_t
undefined
blksize_t
undefined
clone
undefined
cpu_count_t
undefined
dev_t
undefined
empty_sigset
undefined
getcontext
undefined
ino_t
undefined
k_sigaction
type
kernel_timespec
type

The timespec struct used by the kernel.

mcontext_t
undefined
mode_t
undefined
msghdr
undefined
msghdr_const
undefined
nlink_t
undefined
off_t
undefined
restore
undefined
restore_rt
undefined
rlimit_resource
type
siginfo_t
type
socketcall
undefined
stack_t
type
syscall0
undefined
syscall1
undefined
syscall2
undefined
syscall3
undefined
syscall4
undefined
syscall5
undefined
syscall6
undefined
syscall7
undefined
syscall_fork
undefined
syscall_pipe
undefined
time_t
undefined
timeval
undefined
timezone
undefined
ucontext_t
undefined
user_desc
undefined