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
sourcetype LockedType<T>
type LockedType<T>
The parametrised type of the mutual exclusion primitive that can be created by this factory.
Required Methods
sourceunsafe 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.