pub struct ResidentQueueBuffers { /* private fields */ }Expand description
Host-side mirror of the four buffers kept resident by the persistent megakernel runtime: control, ring, debug log, and IO queue.
Implementations§
Source§impl ResidentQueueBuffers
impl ResidentQueueBuffers
Sourcepub fn new(
slot_count: u32,
tenant_count: u32,
observable_slots: u32,
) -> Result<Self, PipelineError>
pub fn new( slot_count: u32, tenant_count: u32, observable_slots: u32, ) -> Result<Self, PipelineError>
Allocate a fresh host mirror for a megakernel’s resident buffers.
§Errors
Returns PipelineError when any runtime buffer size overflows.
Sourcepub fn reset(
&mut self,
tenant_count: u32,
observable_slots: u32,
) -> Result<(), PipelineError>
pub fn reset( &mut self, tenant_count: u32, observable_slots: u32, ) -> Result<(), PipelineError>
Reinitialize this host mirror in place for the same resident geometry.
§Errors
Returns PipelineError when any runtime buffer size overflows.
Sourcepub fn from_parts(
slot_count: u32,
control_bytes: Vec<u8>,
ring_bytes: Vec<u8>,
debug_log_bytes: Vec<u8>,
io_queue_bytes: Vec<u8>,
) -> Result<Self, PipelineError>
pub fn from_parts( slot_count: u32, control_bytes: Vec<u8>, ring_bytes: Vec<u8>, debug_log_bytes: Vec<u8>, io_queue_bytes: Vec<u8>, ) -> Result<Self, PipelineError>
Build a resident-buffer mirror from caller-owned byte buffers.
§Errors
Returns PipelineError when any buffer violates the megakernel ABI.
Sourcepub fn publish_slot(
&mut self,
slot_idx: u32,
tenant_id: u32,
opcode: u32,
args: &[u32],
) -> Result<(), PipelineError>
pub fn publish_slot( &mut self, slot_idx: u32, tenant_id: u32, opcode: u32, args: &[u32], ) -> Result<(), PipelineError>
Publish one work slot into the resident ring mirror.
§Errors
Returns PipelineError::QueueFull when the slot is out of bounds or
still in flight.
Sourcepub fn publish_work_items(
&mut self,
start_slot: u32,
tenant_id: u32,
items: &[ResidentWorkItem],
) -> Result<u32, PipelineError>
pub fn publish_work_items( &mut self, start_slot: u32, tenant_id: u32, items: &[ResidentWorkItem], ) -> Result<u32, PipelineError>
Publish a contiguous fixed-ABI work-item window into the resident ring mirror without resetting unrelated slots.
§Errors
Returns PipelineError::QueueFull when the target slots are outside
the resident ring, still in flight, or contain an unpublished opcode.
Sourcepub fn apply_readback(&mut self, readback: ResidentQueueReadback)
pub fn apply_readback(&mut self, readback: ResidentQueueReadback)
Apply a strict dispatch readback to the resident host mirror.
Sourcepub fn snapshot_readback(&self) -> ResidentQueueReadback
pub fn snapshot_readback(&self) -> ResidentQueueReadback
Clone the current host mirror into a strict readback record.
Sourcepub fn snapshot_readback_into(&self, out: &mut ResidentQueueReadback)
pub fn snapshot_readback_into(&self, out: &mut ResidentQueueReadback)
Clone the current host mirror into caller-owned readback storage.
Sourcepub fn control_bytes(&self) -> &[u8] ⓘ
pub fn control_bytes(&self) -> &[u8] ⓘ
Control-buffer mirror bytes.
Sourcepub fn ring_bytes(&self) -> &[u8] ⓘ
pub fn ring_bytes(&self) -> &[u8] ⓘ
Ring-buffer mirror bytes.
Sourcepub fn ring_bytes_mut(&mut self) -> &mut [u8] ⓘ
pub fn ring_bytes_mut(&mut self) -> &mut [u8] ⓘ
Mutable ring-buffer mirror bytes.
Sourcepub fn debug_log_bytes(&self) -> &[u8] ⓘ
pub fn debug_log_bytes(&self) -> &[u8] ⓘ
Debug-log mirror bytes.
Sourcepub fn io_queue_bytes(&self) -> &[u8] ⓘ
pub fn io_queue_bytes(&self) -> &[u8] ⓘ
IO-queue mirror bytes.
Sourcepub const fn slot_count(&self) -> u32
pub const fn slot_count(&self) -> u32
Resident ring slot count.
Trait Implementations§
Source§impl Clone for ResidentQueueBuffers
impl Clone for ResidentQueueBuffers
Source§impl Debug for ResidentQueueBuffers
impl Debug for ResidentQueueBuffers
impl Eq for ResidentQueueBuffers
Auto Trait Implementations§
impl Freeze for ResidentQueueBuffers
impl RefUnwindSafe for ResidentQueueBuffers
impl Send for ResidentQueueBuffers
impl Sync for ResidentQueueBuffers
impl Unpin for ResidentQueueBuffers
impl UnsafeUnpin for ResidentQueueBuffers
impl UnwindSafe for ResidentQueueBuffers
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.