Struct crs_bind::rtos::Semaphore [−][src]
Represents a FreeRTOS counting semaphore.
Implementations
impl Semaphore[src]
pub fn new(max_count: u32, init_count: u32) -> Self[src]
Creates a new semaphore. Panics on failure; see Semaphore::try_new.
pub fn try_new(max_count: u32, init_count: u32) -> Result<Self, Error>[src]
Creates a new semaphore.
pub fn wait(&self, timeout: Duration) -> Result<(), Error>[src]
Blocks up to timeout until an instance of the semaphore can be taken
(i.e., its count decremented). If the semaphore cannot be taken (due
to timeout or other reason), an error is returned.
pub fn post(&self) -> Result<(), Error>[src]
Increments the semaphore’s count. If the semaphore cannot be given, an error is returned.
pub fn count(&self) -> u32[src]
Gets the semaphore’s current count.
Trait Implementations
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<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>,