Crate scall

source · []
Expand description

Friendlier raw system calls for Rust.

Example usage:

unsafe {
    let pid = syscall_nofail!(GETPID);
    syscall!(KILL, pid, 0).unwrap();

Note: This crate has several functions/macros, and looking through the documentation may seem a little confusing. However, for most purposes, you’ll just want to use the syscall! macro (or sometimes syscall_nofail!). The other functions/macros are mostly present to support more advanced use cases.


pub use platform::*;


This library was built for x86-64 Linux.


Make a syscall, and return the result as a Result<usize, i32>.

A version of syscall! that makes it easier to pass 64-bit arguments.

Make a syscall that should never fail (or for which the result should be completely ignored).

Make a syscall, and return the direct result (platform-specific).


“Decode” a result from syscall_raw!.

Type Definitions

The type returned by syscall_raw! on this platform.