raw-syscall-enumerated 0.7.6

Low-level raw system calls enumerated.
raw-syscall-enumerated-0.7.6 doesn't have any documentation.

raw-syscall-enumerated

Low level system calls.

Latest version Documentation Downloads License

Usage

Add the following to your Cargo.toml:

raw-syscall-enumerated = "0.7.6"

Supported Platforms

  • x86_64-linux

Purpose

This crate builds on raw-syscall-base, providing a function for each system call on the platform.

All functions are marked unsafe, and no validation is done on arguments or return values.

All arguments and return values use the most basic possible types, for example everything is usize on x86_64-linux. All arguments must be converted to this type, and it's up to the caller to determine whether the result represents a pointer or error code or whatever.

All system calls through the latest release of the platform should be supported here. Deprecated system calls should be supported as well. It is up to higher level libraries to check the platform version and prevent unsupported calls from being made if this is desired.

The intention is to provide a minimal stable base with no unnecessary overhead on which to build a higher-level library.

x86_64-linux Example

    use raw_syscall_enumerated::{write, exit_group};
    
    // attempts to write "hello" to STDOUT
    pub unsafe fn hello() -> usize {
        write(1, b"hello" as *const u8 as usize, 5)
    }

    // exits the program with a success code 
    pub unsafe fn exit_success() -> ! {
        exit_group(0)
    }