#[repr(C)]pub struct LlmpPage {
pub magic: u64,
pub sender_id: ClientId,
pub safe_to_unmap: AtomicU16,
pub sender_dead: AtomicU16,
pub current_msg_id: AtomicU64,
pub size_total: usize,
pub size_used: usize,
pub max_alloc_size: usize,
pub messages: [LlmpMsg; 0],
}
Expand description
Contents of the share mem pages, used by llmp internally
Fields
magic: u64
to check if this page got initialized properly
sender_id: ClientId
The id of the sender
safe_to_unmap: AtomicU16
Set to != 1 by the receiver, once it got mapped. It’s not safe for the sender to unmap this page before (The os may have tidied up the memory when the receiver starts to map)
sender_dead: AtomicU16
Not used at the moment (would indicate that the sender is no longer there)
current_msg_id: AtomicU64
The current message ID
size_total: usize
How much space is available on this page in bytes
size_used: usize
How much space is used on this page in bytes
max_alloc_size: usize
The maximum amount of bytes that ever got allocated on this page in one go. An inidactor of what to use as size for future pages
messages: [LlmpMsg; 0]
Pointer to the messages, from here on.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for LlmpPage
impl Send for LlmpPage
impl Sync for LlmpPage
impl Unpin for LlmpPage
impl UnwindSafe for LlmpPage
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Tail, T> Prepend<T> for Tail
impl<Tail, T> Prepend<T> for Tail
type PreprendResult = Tail
type PreprendResult = Tail
The Resulting TupleList
, of an Prepend::prepend()
call,
including the prepended entry. Read more
sourcefn prepend(self, value: T) -> (T, <Tail as Prepend<T>>::PreprendResult)
fn prepend(self, value: T) -> (T, <Tail as Prepend<T>>::PreprendResult)
Prepend a value to this tuple, returning a new tuple with prepended value.