Name Description Size
aarch64.rs aarch64 Linux system calls. 6244
arm.rs arm Linux system calls. 6151
mips.rs mipsel Linux system calls. On mipsel, Linux indicates success or failure using `$a3` rather than by returning a negative error code as most other architectures do. Mips-family platforms have a special calling convention for `__NR_pipe`, however we use `__NR_pipe2` instead to avoid having to implement it. 14784
mips32r6.rs mipsisa32r6el Linux system calls. On mipsisa32r6el, Linux indicates success or failure using `$a3` rather than by returning a negative error code as most other architectures do. Mips-family platforms have a special calling convention for `__NR_pipe`, however we use `__NR_pipe2` instead to avoid having to implement it. 14798
mips64.rs mips64el Linux system calls. On mips64el, Linux indicates success or failure using `$a3` (`$7`) rather than by returning a negative error code as most other architectures do. Mips-family platforms have a special calling convention for `__NR_pipe`, however we use `__NR_pipe2` instead to avoid having to implement it. 12936
mips64r6.rs mipsisa64r6el Linux system calls. On mipsisa64r6el, Linux indicates success or failure using `$a3` (`$7`) rather than by returning a negative error code as most other architectures do. Mips-family platforms have a special calling convention for `__NR_pipe`, however we use `__NR_pipe2` instead to avoid having to implement it. Note that MIPS R6 inline assembly currently doesn't differ from MIPS, because no explicit call of R6-only or R2-only instructions exist here. 13104
mod.rs Architecture-specific syscall code. This module also has a `choose` submodule which chooses a scheme and is what most of the `rustix` syscalls use. Compilers should really have intrinsics for making system calls. They're much like regular calls, with custom calling conventions, and calling conventions are otherwise the compiler's job. But for now, use inline asm. The calling conventions for Linux syscalls are [documented here]. [documented here]: https://man7.org/linux/man-pages/man2/syscall.2.html # Safety This contains the inline `asm` statements performing the syscall instructions. 10109
powerpc64.rs powerpc64le Linux system calls. On powerpc64le, Linux indicates success or failure using `cr0.SO` rather than by returning a negative error code as most other architectures do. In theory we could immediately translate this into a `Result`, and it'd save a few branches. And in theory we could have specialized sequences for use with syscalls that are known to never fail. However, those would require more extensive changes in rustix's platform-independent code. For now, we check the flag and negate the error value to make PowerPC64 look like other architectures. 10431
riscv64.rs riscv64 Linux system calls. 6156
thumb.rs arm Linux system calls, using thumb-mode. In thumb-mode, r7 is the frame pointer and is not permitted to be used in an inline asm operand, so we have to use a different register and copy it into r7 inside the inline asm. 7744
x86.rs 32-bit x86 Linux system calls. There are two forms; `indirect_*` which take a callee, which allow calling through the vDSO when possible, and plain forms, which use the `int 0x80` instruction. Most `rustix` syscalls use the vsyscall mechanism rather than going using `int 0x80` sequences, as vsyscall is much faster. Syscalls made with `int 0x80` preserve the flags register, while syscalls made using vsyscall do not. 12669
x86_64.rs x86-64 Linux system calls. 6977