Trait r3_core::kernel::raw::KernelSemaphore
source · pub unsafe trait KernelSemaphore: KernelBase {
type RawSemaphoreId: Id;
// Required methods
unsafe fn raw_semaphore_drain(
this: Self::RawSemaphoreId
) -> Result<(), DrainSemaphoreError>;
unsafe fn raw_semaphore_get(
this: Self::RawSemaphoreId
) -> Result<SemaphoreValue, GetSemaphoreError>;
unsafe fn raw_semaphore_signal(
this: Self::RawSemaphoreId,
count: SemaphoreValue
) -> Result<(), SignalSemaphoreError>;
unsafe fn raw_semaphore_signal_one(
this: Self::RawSemaphoreId
) -> Result<(), SignalSemaphoreError>;
unsafe fn raw_semaphore_wait_one(
this: Self::RawSemaphoreId
) -> Result<(), WaitSemaphoreError>;
unsafe fn raw_semaphore_wait_one_timeout(
this: Self::RawSemaphoreId,
timeout: Duration
) -> Result<(), WaitSemaphoreTimeoutError>;
unsafe fn raw_semaphore_poll_one(
this: Self::RawSemaphoreId
) -> Result<(), PollSemaphoreError>;
}
Expand description
Required Associated Types§
sourcetype RawSemaphoreId: Id
type RawSemaphoreId: Id
The type to identify semaphores.