Lines Matching refs:lock
35 static inline void __raw_spin_lock(raw_spinlock_t *lock) in __raw_spin_lock() argument
46 : "+m" (lock->slock) : : "memory"); in __raw_spin_lock()
58 static inline void __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long flags) in __raw_spin_lock_flags() argument
80 : [slock] "+m" (lock->slock) in __raw_spin_lock_flags()
87 static inline int __raw_spin_trylock(raw_spinlock_t *lock) in __raw_spin_trylock() argument
92 :"=q" (oldval), "+m" (lock->slock) in __raw_spin_trylock()
106 static inline void __raw_spin_unlock(raw_spinlock_t *lock) in __raw_spin_unlock() argument
108 asm volatile("movb $1,%0" : "+m" (lock->slock) :: "memory"); in __raw_spin_unlock()
113 static inline void __raw_spin_unlock(raw_spinlock_t *lock) in __raw_spin_unlock() argument
118 : "=q" (oldval), "+m" (lock->slock) in __raw_spin_unlock()
124 static inline void __raw_spin_unlock_wait(raw_spinlock_t *lock) in __raw_spin_unlock_wait() argument
126 while (__raw_spin_is_locked(lock)) in __raw_spin_unlock_wait()
157 return (int)(x)->lock > 0; in __raw_read_can_lock()
166 return (x)->lock == RW_LOCK_BIAS; in __raw_write_can_lock()
187 static inline int __raw_read_trylock(raw_rwlock_t *lock) in __raw_read_trylock() argument
189 atomic_t *count = (atomic_t *)lock; in __raw_read_trylock()
197 static inline int __raw_write_trylock(raw_rwlock_t *lock) in __raw_write_trylock() argument
199 atomic_t *count = (atomic_t *)lock; in __raw_write_trylock()
208 asm volatile(LOCK_PREFIX "incl %0" :"+m" (rw->lock) : : "memory"); in __raw_read_unlock()
214 : "+m" (rw->lock) : : "memory"); in __raw_write_unlock()
217 #define _raw_spin_relax(lock) cpu_relax() argument
218 #define _raw_read_relax(lock) cpu_relax() argument
219 #define _raw_write_relax(lock) cpu_relax() argument