pub unsafe trait KernelMutex: KernelBase {
    type RawMutexId: Id;

    const RAW_SUPPORTED_MUTEX_PROTOCOLS: &'static [Option<MutexProtocolKind>] = _;

    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

Provides access to the mutex API exposed by a kernel.

Safety

See the Safety section of the module documentation.

Required Associated Types

The type to identify mutexes.

Provided Associated Constants

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.

Required Methods

Implements Mutex::is_locked.

Safety

See the Safety section of the module documentation.

Implements Mutex::unlock.

Safety

See the Safety section of the module documentation.

Implements Mutex::lock.

Safety

See the Safety section of the module documentation.

Implements Mutex::lock_timeout.

Safety

See the Safety section of the module documentation.

Implements Mutex::try_lock.

Safety

See the Safety section of the module documentation.

Implements Mutex::mark_consistent.

Safety

See the Safety section of the module documentation.

Implementors