Struct crs_bind::rtos::Mutex [−][src]
Represents an object which is protected by a FreeRTOS recursive mutex.
Implementations
impl<T> Mutex<T>[src]
Provides a constant-period looping construct.
pub fn new(data: T) -> Self[src]
Creates a new mutex which wraps the given object. Panics on failure; see
Mutex::try_new().
pub fn try_new(data: T) -> Result<Self, Error>[src]
Creates a new mutex which wraps the given object.
impl<T: ?Sized> Mutex<T>[src]
pub fn lock(&self) -> MutexGuard<'_, T>[src]
Obtains a MutexGuard giving access to the object protected by the
mutex. Blocks until access can be obtained. Panics on failure; see
Mutex::try_lock().
Behaviour
This function is blocking; it does not return until the the mutex is taken by the task, and allows other tasks to run in the meantime. Further, the task which currently holds the mutex actually inherits the current task’s priority, if it is higher; this prevents a high-priority task from being slowed down by waiting for a resource held by a low-priority task. See this documentation from FreeRTOS for details.
pub fn try_lock(&self) -> Result<MutexGuard<'_, T>, Error>[src]
Obtains a MutexGuard giving access to the object protected by the
mutex. Blocks until access can be obtained; see Mutex::lock() for a
more thorough behavioural description.
pub fn poll(&self) -> Option<MutexGuard<'_, T>>[src]
Obtains a MutexGuard giving access to the object protected by the
mutex, if it is available immediately. Does not block.
Trait Implementations
impl<T: ?Sized + Debug> Debug for Mutex<T>[src]
impl<T: ?Sized + Default> Default for Mutex<T>[src]
impl<T: ?Sized> Drop for Mutex<T>[src]
impl<T> From<T> for Mutex<T>[src]
impl<T: ?Sized + Send> Send for Mutex<T>[src]
impl<T: ?Sized + Sync> Sync for Mutex<T>[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<!> for T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,