Crate scall[][src]

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.

Re-exports

pub use platform::*;

Modules

platform

This library was built for x86-64 Linux.

Macros

syscall

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

syscall_args64Linux

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

syscall_nofail

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

syscall_raw

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

Functions

decode_raw_result

"Decode" a result from syscall_raw!.

Type Definitions

RawResult

The type returned by syscall_raw! on this platform.