Lines Matching refs:lock
22 int8_t lock; // 1:unlocked 0:locked member
25 extern void __arch_spin_lock(spinlock_t *lock);
26 extern void __arch_spin_unlock(spinlock_t *lock);
28 extern void __arch_spin_lock_no_preempt(spinlock_t *lock);
29 extern void __arch_spin_unlock_no_preempt(spinlock_t *lock);
31 extern long __arch_spin_trylock(spinlock_t *lock);
38 void spin_lock(spinlock_t *lock) in spin_lock() argument
40 __arch_spin_lock(lock); in spin_lock()
48 void spin_unlock(spinlock_t *lock) in spin_unlock() argument
50 __arch_spin_unlock(lock); in spin_unlock()
58 void spin_init(spinlock_t *lock) in spin_init() argument
61 lock->lock = 1; in spin_init()
70 void spin_lock_no_preempt(spinlock_t *lock) in spin_lock_no_preempt() argument
72 __arch_spin_lock_no_preempt(lock); in spin_lock_no_preempt()
80 void spin_unlock_no_preempt(spinlock_t *lock) in spin_unlock_no_preempt() argument
82 __arch_spin_unlock_no_preempt(lock); in spin_unlock_no_preempt()
91 long spin_trylock(spinlock_t *lock) in spin_trylock() argument
93 return __arch_spin_trylock(lock); in spin_trylock()
100 #define spin_lock_irqsave(lock, flags) … argument
104 …spin_lock(lock); …
111 #define spin_unlock_irqrestore(lock, flags) … argument
114 …spin_unlock(lock); …
122 #define spin_lock_irq(lock) … argument
126 …spin_lock(lock); …
133 #define spin_unlock_irq(lock) … argument
136 …spin_unlock(lock); …
147 static inline bool spin_is_locked(const spinlock_t *lock) in spin_is_locked() argument
149 int x = READ_ONCE(lock->lock); in spin_is_locked()
153 #define assert_spin_locked(lock) BUG_ON(!spin_is_locked(lock)) argument