[−][src]Trait sunrise_kernel::sync::Lock
Abstraction around various kind of locks.
Some functions need to take a Lock and/or a LockGuard as argument, but don't really care about the kind of lock (schedule comes to mind). This trait is a simple abstraction around this concept.
Required methods
fn lock(&'a self) -> GUARD
Locks the lock until the returned guard is dropped. The actual semantics is up to the underlying lock. This trait does not make any guarantee about anything like memory ordering or whatnot. Please read the documentation of the underlying lock type.