Struct r3::kernel::semaphore::SemaphoreDefiner
source · pub struct SemaphoreDefiner<System>where
System: KernelSemaphore,{ /* private fields */ }
Expand description
The definer (static builder) for Semaphore
.
Implementations
sourceimpl<System> SemaphoreDefiner<System>where
System: KernelSemaphore,
impl<System> SemaphoreDefiner<System>where
System: KernelSemaphore,
sourcepub const fn initial(self, initial: usize) -> SemaphoreDefiner<System>
pub const fn initial(self, initial: usize) -> SemaphoreDefiner<System>
[Required] Specify the initial semaphore value.
Must be less than or equal to maximum
.
sourcepub const fn maximum(self, maximum: usize) -> SemaphoreDefiner<System>
pub const fn maximum(self, maximum: usize) -> SemaphoreDefiner<System>
[Required] Specify the maximum semaphore value.
sourcepub const fn queue_order(
self,
queue_order: QueueOrder
) -> SemaphoreDefiner<System>
pub const fn queue_order(
self,
queue_order: QueueOrder
) -> SemaphoreDefiner<System>
Specify how tasks are sorted in the wait queue of the semaphore.
Defaults to QueueOrder::TaskPriority
when unspecified.
sourcepub const fn finish<C>(self, c: &mut Cfg<'_, C>) -> SemaphoreRef<'static, System>where
C: CfgSemaphore<System = System>,
pub const fn finish<C>(self, c: &mut Cfg<'_, C>) -> SemaphoreRef<'static, System>where
C: CfgSemaphore<System = System>,
Complete the definition of a semaphore, returning a reference to the semaphore.
Auto Trait Implementations
impl<System> RefUnwindSafe for SemaphoreDefiner<System>
impl<System> Send for SemaphoreDefiner<System>
impl<System> Sync for SemaphoreDefiner<System>
impl<System> Unpin for SemaphoreDefiner<System>
impl<System> UnwindSafe for SemaphoreDefiner<System>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more