pub struct RingState { /* private fields */ }Expand description
Represents the state tracking structure for the ring buffer.
Implementations§
Source§impl RingState
 
impl RingState
Sourcepub const EIDX_TERM: usize = 0usize
 
pub const EIDX_TERM: usize = 0usize
Represents an queue index to terminate a dequeue operation.
Sourcepub fn unset_next(&self)
 
pub fn unset_next(&self)
Unsets the next RingState.
Sourcepub const fn next_check(&self) -> &AtomicUsize
 
pub const fn next_check(&self) -> &AtomicUsize
Gets a reference to the next check value.
Sourcepub fn load_next_check(&self) -> usize
 
pub fn load_next_check(&self) -> usize
Gets the next check value.
Sourcepub fn set_next_check(&self, val: usize)
 
pub fn set_next_check(&self, val: usize)
Sets the next check value.
Sourcepub unsafe fn curr_thread(&self) -> &AtomicPtr<Self>
 
pub unsafe fn curr_thread(&self) -> &AtomicPtr<Self>
Sourcepub unsafe fn load_curr_thread(&self) -> *mut Self
 
pub unsafe fn load_curr_thread(&self) -> *mut Self
Sourcepub unsafe fn set_curr_thread(&self, val: *mut Self)
 
pub unsafe fn set_curr_thread(&self, val: *mut Self)
Sourcepub fn unset_curr_thread(&self)
 
pub fn unset_curr_thread(&self)
Unsets the current thread RingState.
Sourcepub const fn phase2(&self) -> &RingPhase2
 
pub const fn phase2(&self) -> &RingPhase2
Gets a reference to the phase2 value.
Sourcepub fn phase2_mut(&mut self) -> &mut RingPhase2
 
pub fn phase2_mut(&mut self) -> &mut RingPhase2
Gets a mutable reference to the phase2 value.
Sourcepub fn set_phase2(&mut self, val: RingPhase2)
 
pub fn set_phase2(&mut self, val: RingPhase2)
Sets the phase2 value.
Sourcepub fn load_init_tail(&self) -> Uint
 
pub fn load_init_tail(&self) -> Uint
Gets the init tail value.
Sourcepub fn set_init_tail(&self, val: Uint)
 
pub fn set_init_tail(&self, val: Uint)
Sets the init tail value.
Sourcepub fn load_init_head(&self) -> Uint
 
pub fn load_init_head(&self) -> Uint
Gets the init head value.
Sourcepub fn set_init_head(&self, val: Uint)
 
pub fn set_init_head(&self, val: Uint)
Sets the init head value.
Sourcepub fn eidx(&self) -> &AtomicUsize
 
pub fn eidx(&self) -> &AtomicUsize
Gets a reference to the enqueue index value.
Sourcepub fn thread_id(&self) -> &AtomicUsize
 
pub fn thread_id(&self) -> &AtomicUsize
Gets a reference to the thread ID value.
Sourcepub fn load_thread_id(&self) -> usize
 
pub fn load_thread_id(&self) -> usize
Gets thread ID value.
Sourcepub fn set_thread_id(&self, val: usize)
 
pub fn set_thread_id(&self, val: usize)
Sets the thread ID value.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RingState
impl RefUnwindSafe for RingState
impl Send for RingState
impl Sync for RingState
impl Unpin for RingState
impl UnwindSafe for RingState
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
Mutably borrows from an owned value. Read more