Trait kernel::sync::LockFactory
source · [−]pub trait LockFactory {
type LockedType<T>;
unsafe fn new_lock<T>(data: T) -> Self::LockedType<T>;
}
Expand description
A creator of instances of a mutual exclusion (lock) primitive.
Required Associated Types
type LockedType<T>
type LockedType<T>
The parametrised type of the mutual exclusion primitive that can be created by this factory.
Required Methods
unsafe fn new_lock<T>(data: T) -> Self::LockedType<T>
unsafe fn new_lock<T>(data: T) -> Self::LockedType<T>
Constructs a new instance of the mutual exclusion primitive.
Safety
The caller must call LockIniter::init_lock
before using the lock.