Appearance
cellpack::loader::RingHeader
Module contract · All interfaces
At a glance
#[repr(C)]pub struct RingHeader {Show 17 fields
pub magic: u64,
pub version: u32,
pub slots: u32,
pub slot_cells: u32,
pub world: u32,
pub schemas: u32,
pub reserved: u32,
pub slot_stride: u64,
pub slot_offset: u64,
pub data_offset: u64,
pub total_bytes: u64,
pub positions: AtomicU64,
pub abort: AtomicU32,
pub producer: AtomicU32,
pub generation: AtomicU64,
pub offsets: [u64; 64],
pub cell_bytes: [u32; 64],
}The ring’s header, at the start of control memory: geometry, the current run, and per-schema region offsets and cell sizes.
Fields hold offsets and counts only, never pointers, so the same mapping is valid in every process that attaches it. Non-atomic fields are written once, before any participant joins.
Fields and variants
magic
magic: u64MAGIC, so an unrelated mapping is rejected on attach.
version
version: u32VERSION of this layout.
slots
slots: u32Slots, and batch b’s slot number is b % slots.
slot_cells
slot_cells: u32Positions per slot.
world
world: u32Consumer ranks.
schemas
schemas: u32Schemas, one region each per slot.
reserved
reserved: u32EXTERNAL when control and data were initialized as separate regions; 0 for one contiguous mapping.
slot_stride
slot_stride: u64Bytes from one slot’s start to the next.
slot_offset
slot_offset: u64Offset of the first slot header from the start of control memory.
data_offset
data_offset: u64Offset of the first slot’s data from the start of the mapping.
total_bytes
total_bytes: u64Bytes of control and data together, as one mapping.
positions
positions: AtomicU64Positions of the current run.
abort
abort: AtomicU32Nonzero once any participant aborted the ring; never cleared.
producer
producer: AtomicU321 while a producer holds the ring, 0 otherwise.
generation
generation: AtomicU64The current or last run’s generation.
offsets
Per schema: its region’s offset within a slot.
cell_bytes
Per schema: bytes of one cell’s output.
Contract reference
See the module reference for semantic input/output rules, units, allocation, mutation, failure behavior, and lifetime requirements. Declarations and documented members are synchronized from the crate source.