Struct shared_bus::AtomicCheckMutex
source · pub struct AtomicCheckMutex<BUS> { /* private fields */ }
Expand description
A simple coherency checker for sharing across multiple tasks/threads.
This mutex type can be used when all bus users are contained in a single structure, and is intended for use with RTIC. When all bus users are contained within a structure managed by RTIC, RTIC will guarantee that bus collisions do not occur. To protect against accidentaly misuse, this mutex uses an atomic bool to determine when the bus is in use. If a bus collision is detected, the code will panic.
This mutex type is used with the BusManagerAtomicMutex
type.
This manager type is explicitly safe to share across threads because it checks to ensure that collisions due to bus sharing do not occur.
Trait Implementations§
source§impl<BUS> BusMutex for AtomicCheckMutex<BUS>
impl<BUS> BusMutex for AtomicCheckMutex<BUS>
source§impl<BUS: Debug> Debug for AtomicCheckMutex<BUS>
impl<BUS: Debug> Debug for AtomicCheckMutex<BUS>
impl<BUS> Sync for AtomicCheckMutex<BUS>
Auto Trait Implementations§
impl<BUS> !RefUnwindSafe for AtomicCheckMutex<BUS>
impl<BUS> Send for AtomicCheckMutex<BUS>where BUS: Send,
impl<BUS> Unpin for AtomicCheckMutex<BUS>where BUS: Unpin,
impl<BUS> UnwindSafe for AtomicCheckMutex<BUS>where BUS: UnwindSafe,
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