Struct ControlFrame
pub struct ControlFrame<'a, K> { /* private fields */ }Expand description
SAFETY: ptr must point to a valid control frame, and the observer must have initialised.
Once the observer has initialised, only next and current in the control frame can be updated.
Implementations§
§impl<'a, K: Default> ControlFrame<'a, K>
impl<'a, K: Default> ControlFrame<'a, K>
pub const NEXT_OFFSET: usize
pub const CURRENT_OFFSET: usize
pub const NUM_CONTROL_FRAMES_OFFSET: usize
pub unsafe fn new(ptr: *mut u8) -> ControlFrame<'a, K>
pub unsafe fn new(ptr: *mut u8) -> ControlFrame<'a, K>
§Safety
ptr must point to a control frame.
Caller must ensure that the lifetime is correct.
pub fn reserved_range(&self) -> Range<u64> ⓘ
pub fn xsave_layout(&self) -> &Layout
pub fn num_command_frames(&self) -> u32
§impl ControlFrame<'_, Host>
impl ControlFrame<'_, Host>
pub fn current(&self) -> u32
pub fn current(&self) -> u32
Returns the command frame index that’s currently being processed or waited on by the observer.
If the command queue is empty, the observer is waiting for us to fill the command frame pointed to by current.
If the command queue is not empty, the observer is currently processing the command frame pointed to by current.
current is updated after the command frame itself has been updated.
The command frame self.current() - 1 is guaranteed to not be modified as long as next < self.current() - 1.