Function starnix_sync::lock_both

source ·
pub fn lock_both<'a, T, L, P>(
    locked: &'a mut Locked<'_, P>,
    m1: &'a OrderedMutex<T, L>,
    m2: &'a OrderedMutex<T, L>
) -> (MutexGuard<'a, T>, MutexGuard<'a, T>, Locked<'a, L>)
where P: LockBefore<L>,
Expand description

Lock two OrderedMutex of the same level in the consistent order. Returns both guards and a new locked context.