lx 0.4.0

A no_std crate to use Linux system calls
Documentation
1
2
3
4
5
6
7
8
9
10
11
use super::abi::*;

/// Exits the program.
#[inline]
pub fn exit(code: i32) -> crate::Result<!> {
    let ret = unsafe { syscall_1(60, code as usize) as u32 };
    if let Ok(err) = crate::Error::try_from(ret) {
        return Err(err);
    }
    unreachable!("exit returned an invalid error code")
}