Macro raw_syscall

Source
macro_rules! raw_syscall {
    ($nr:expr) => { ... };
    ($nr:expr, $a1:expr) => { ... };
    ($nr:expr, $a1:expr, $a2:expr) => { ... };
    ($nr:expr, $a1:expr, $a2:expr, $a3:expr) => { ... };
    ($nr:expr, $a1:expr, $a2:expr, $a3:expr, $a4:expr) => { ... };
    ($nr:expr, $a1:expr, $a2:expr, $a3:expr, $a4:expr, $a5:expr) => { ... };
    ($nr:expr, $a1:expr, $a2:expr, $a3:expr, $a4:expr, $a5:expr, $a6:expr) => { ... };
}
Expand description

Performs a raw syscall and returns a SyscallWord.

Prefer syscall! unless you are certain the syscall cannot fail (e.g., gettid).

Accepts a syscall number and a variable number of arguments (0 to 6).

§Example

use rawsys_linux::{Sysno, raw_syscall};
let tid = unsafe { raw_syscall!(Sysno::gettid) };
println!("tid={tid}");