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.
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_
args64 Linux or Android - 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 Aliases§
- RawResult
- The type returned by
syscall_raw!
on this platform.