Expand description
Utility functions and struct
Modules§
- byte_
order - Module with helpers to read/write bytes into slices
- net
- Module with network related helpers
- signal
- Module with external libc functions
- sm
- Module with state machine
Functions§
- align_
down - Align address down to the aligment.
- align_
up - Align address up to the aligment.
- bytes_
to_ mib - Converts Bytes to MiB, truncating any remainder
- get_
page_ size - Return the default page size of the platform, in bytes.
- mib_
to_ bytes - Converts MiB to Bytes
- open_
file_ write_ nonblock - Create and open a File for writing to it.
In case we open a FIFO, in order to not block the instance if nobody is consuming the message
that is flushed to it, we are opening it with
O_NONBLOCKflag. In this case, writing to a pipe will start failing when reaching 64K of unconsumed content. - u64_
to_ usize - Safely converts a u64 value to a usize value. This bypasses the Clippy lint check because we only support 64-bit platforms.
- usize_
to_ u64 - Safely converts a usize value to a u64 value. This bypasses the Clippy lint check because we only support 64-bit platforms.
- wrap_
usize_ to_ u32 - Converts a usize into a wrapping u32.