nc 0.9.8

Access system calls directly
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/// Terminate current process.
///
/// # Examples
///
/// ```
/// unsafe { nc::exit(0); }
/// ```
pub unsafe fn exit(status: i32) -> ! {
    let status = status as usize;
    unsafe {
        let _ret = syscall1(SYS_EXIT, status);
        core::hint::unreachable_unchecked();
    }
}