brutal_types/lib.rs
1//! This crate contains every types used to interact with BRUTAL.
2//! BRUTAL (<https://github.com/brutal-org/brutal>) is an operating system made from scratch, which is based on a microkernel.
3
4/// BRUTAL handler type.
5pub type BrHandle = u64;
6
7pub type BrRight = u32;
8
9pub type BrTaskFlags = u64;
10
11/// BRUTAL handler value if null.
12pub const BR_HANDLE_NIL: BrHandle = 0;
13/// BRUTAL handler value if error.
14pub const BR_HANDLE_ERR: BrHandle = unsafe { core::mem::transmute(-1i64) };
15/// BRUTAL handler value if self.
16pub const BR_HANDLE_SELF: BrHandle = unsafe { core::mem::transmute(-2i64) };
17
18/// BRUTAL memory flags.
19/// TODO: List bits.
20pub type BrMemoryFlags = u64;