Lines Matching refs:lock
15 pub fn spin_lock_irqsave(lock: *mut spinlock_t, flags: &mut u64) { in spin_lock_irqsave()
18 spin_lock(lock); in spin_lock_irqsave()
24 pub fn spin_unlock_irqrestore(lock: *mut spinlock_t, flags: &u64) { in spin_unlock_irqrestore()
26 spin_unlock(lock); in spin_unlock_irqrestore()
34 pub fn spin_is_locked(lock: &spinlock_t) -> bool { in spin_is_locked()
35 let val = unsafe { read_volatile(&lock.lock as *const i8) }; in spin_is_locked()
42 Self { lock: 1 } in default()
47 pub fn spin_lock_irq(lock: *mut spinlock_t) { in spin_lock_irq()
50 spin_lock(lock); in spin_lock_irq()
55 pub fn spin_unlock_irq(lock: *mut spinlock_t) { in spin_unlock_irq()
57 spin_unlock(lock); in spin_unlock_irq()
74 pub fn lock(&self) { in lock() method
81 self.lock(); in lock_irq()
133 self.lock(); in lock_irqsave()
146 lock: RawSpinlock, field
156 lock: &'a SpinLock<T>, field
166 lock: RawSpinlock::INIT, in new()
172 pub fn lock(&self) -> SpinLockGuard<T> { in lock() method
173 self.lock.lock(); in lock()
175 return SpinLockGuard { lock: self }; in lock()
184 return unsafe { &*self.lock.data.get() }; in deref()
191 return unsafe { &mut *self.lock.data.get() }; in deref_mut()
198 self.lock.lock.unlock(); in drop()