Trait r3_core::kernel::raw::KernelMutex
source · pub unsafe trait KernelMutex: KernelBase {
type RawMutexId: Id;
const RAW_SUPPORTED_MUTEX_PROTOCOLS: &'static [Option<MutexProtocolKind>] = _;
// Required methods
unsafe fn raw_mutex_is_locked(
this: Self::RawMutexId
) -> Result<bool, QueryMutexError>;
unsafe fn raw_mutex_unlock(
this: Self::RawMutexId
) -> Result<(), UnlockMutexError>;
unsafe fn raw_mutex_lock(
this: Self::RawMutexId
) -> Result<(), LockMutexError>;
unsafe fn raw_mutex_lock_timeout(
this: Self::RawMutexId,
timeout: Duration
) -> Result<(), LockMutexTimeoutError>;
unsafe fn raw_mutex_try_lock(
this: Self::RawMutexId
) -> Result<(), TryLockMutexError>;
unsafe fn raw_mutex_mark_consistent(
this: Self::RawMutexId
) -> Result<(), MarkConsistentMutexError>;
}
Expand description
Required Associated Types§
sourcetype RawMutexId: Id
type RawMutexId: Id
The type to identify mutexes.
Provided Associated Constants§
sourceconst RAW_SUPPORTED_MUTEX_PROTOCOLS: &'static [Option<MutexProtocolKind>] = _
const RAW_SUPPORTED_MUTEX_PROTOCOLS: &'static [Option<MutexProtocolKind>] = _
Used by MutexProtocol::is_supported
.
None
elements don’t match any values of MutexProtocol
. This might be
useful for conditionally enabling some of them.
The default value is an empty slice.