pub struct PiMutexCoreView<'lock> { /* private fields */ }Expand description
Borrowed storage of one native PI-mutex state machine.
The view keeps the algorithm independent from the physical wrapper. Native
PiMutexCore values and OS-independent fixed-layout storage therefore
execute the same owner, generation, and waiter-lifecycle transitions.
Implementations§
Source§impl<'lock> PiMutexCoreView<'lock>
impl<'lock> PiMutexCoreView<'lock>
Sourcepub fn try_acquire(
self,
current: PiTaskId,
) -> Result<PiMutexAcquire, PiMutexStateError>
pub fn try_acquire( self, current: PiTaskId, ) -> Result<PiMutexAcquire, PiMutexStateError>
Attempts the atomic uncontended acquisition path.
Sourcepub unsafe fn try_release_owned(
self,
current: PiTaskId,
) -> Result<PiMutexOwnedRelease, PiMutexStateError>
pub unsafe fn try_release_owned( self, current: PiTaskId, ) -> Result<PiMutexOwnedRelease, PiMutexStateError>
Releases this raw mutex for the executing owner identity.
§Safety
The caller must own this mutex through a higher-level raw-mutex
contract, pass the executing scheduler identity as current, and
retain that authority through any contended handoff.
Sourcepub fn is_owned_by(self, current: PiTaskId) -> bool
pub fn is_owned_by(self, current: PiTaskId) -> bool
Returns whether current is the physical owner.
Sourcepub fn is_locked(self) -> bool
pub fn is_locked(self) -> bool
Returns whether the mutex is owned or in an ownerless handoff window.
Sourcepub fn mutex_ref(self) -> Result<PiMutexRef<'lock>, PiMutexStateError>
pub fn mutex_ref(self) -> Result<PiMutexRef<'lock>, PiMutexStateError>
Borrows this physical lock’s generation-bearing scheduler identity.
Trait Implementations§
Source§impl<'lock> Clone for PiMutexCoreView<'lock>
impl<'lock> Clone for PiMutexCoreView<'lock>
Source§fn clone(&self) -> PiMutexCoreView<'lock>
fn clone(&self) -> PiMutexCoreView<'lock>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'lock> Copy for PiMutexCoreView<'lock>
Auto Trait Implementations§
impl<'lock> !RefUnwindSafe for PiMutexCoreView<'lock>
impl<'lock> !Send for PiMutexCoreView<'lock>
impl<'lock> !Sync for PiMutexCoreView<'lock>
impl<'lock> !UnwindSafe for PiMutexCoreView<'lock>
impl<'lock> Freeze for PiMutexCoreView<'lock>
impl<'lock> Unpin for PiMutexCoreView<'lock>
impl<'lock> UnsafeUnpin for PiMutexCoreView<'lock>
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