pub unsafe trait MutexHandle {
    type System: KernelMutex;

    // Required methods
    unsafe fn from_id(id: <Self::System as KernelMutex>::RawMutexId) -> Self;
    fn id(&self) -> <Self::System as KernelMutex>::RawMutexId;
    fn borrow(&self) -> MutexRef<'_, Self::System>;
}
Expand description

The trait for safe wrappers of System::RawMutexId, i.e., Mutex and MutexRef.

Required Associated Types§

source

type System: KernelMutex

The system type this object pertains to.

Required Methods§

source

unsafe fn from_id(id: <Self::System as KernelMutex>::RawMutexId) -> Self

Construct a Mutex from RawMutexId.

Safety

This function is marked as unsafe to prevent safe code from compromising object safety.

source

fn id(&self) -> <Self::System as KernelMutex>::RawMutexId

Get the raw RawMutexId value representing this object.

source

fn borrow(&self) -> MutexRef<'_, Self::System>

Borrow self as MutexRef.

Implementors§

source§

impl<System: KernelMutex> MutexHandle for MutexRef<'_, System>

§

type System = System

source§

impl<System: NotSupportedYet> MutexHandle for Mutex<System>

§

type System = System