fn drop(&mut self) {
        let g = self.guard.take();
        drop(g);
        atomic::fence(atomic::Ordering::SeqCst);
        unsafe {
            LOCK_COUNT.fetch_sub(1, atomic::Ordering::SeqCst);
            // if we *can* enable interrupts, based on total number of outstanding locks
            // AND if our OS *wants* interrupts enabled
            if LOCK_COUNT.load(atomic::Ordering::SeqCst) == 0 &&
               INT_ENABLED.load(atomic::Ordering::Acquire) {
                irq::enable();
            }
        }
    }
/// The dropping of the MutexGuard will release the lock it was created from.
The dropping of the MutexGuard will release the lock it was created from.
The dropping of the MutexGuard will release the lock it was created from .
fn drop(&mut self) {
        let g = self.guard.take();
        drop(g);
        atomic::fence(atomic::Ordering::SeqCst);
        unsafe {
            LOCK_COUNT.fetch_sub(1, atomic::Ordering::SeqCst);
            // if we *can* enable interrupts, based on total number of outstanding locks
            // AND if our OS *wants* interrupts enabled
            if LOCK_COUNT.load(atomic::Ordering::SeqCst) == 0 &&
               INT_ENABLED.load(atomic::Ordering::Acquire) {
                irq::enable();
            }
        }
    }
fn drop ( & mut self ) { let g = self . guard . take ( ) ; drop ( g ) ; atomic :: fence ( atomic :: Ordering :: SeqCst ) ; unsafe { LOCK_COUNT . fetch_sub ( 1 , atomic :: Ordering :: SeqCst ) ; // if we *can* enable interrupts, based on total number of outstanding locks // AND if our OS *wants* interrupts enabled if LOCK_COUNT . load ( atomic :: Ordering :: SeqCst ) == 0 && INT_ENABLED . load ( atomic :: Ordering :: Acquire ) { irq :: enable ( ) ; } } }
The dropping of the MutexGuard will release the lock it was created from.
The dropping of the MutexGuard will release the lock it was created from .
&mut self
&mut self