Lines Matching refs:lock

17 #define arch_spin_is_locked(x)	((x)->lock != 0)
19 static inline int arch_spin_value_unlocked(arch_spinlock_t lock) in arch_spin_value_unlocked() argument
21 return lock.lock == 0; in arch_spin_value_unlocked()
24 static inline void arch_spin_unlock(arch_spinlock_t * lock) in arch_spin_unlock() argument
27 lock->lock = 0; in arch_spin_unlock()
30 static inline void arch_spin_lock(arch_spinlock_t * lock) in arch_spin_lock() argument
46 : "=&r" (tmp), "=m" (lock->lock) in arch_spin_lock()
47 : "m"(lock->lock) : "memory"); in arch_spin_lock()
50 static inline int arch_spin_trylock(arch_spinlock_t *lock) in arch_spin_trylock() argument
52 return !test_and_set_bit(0, &lock->lock); in arch_spin_trylock()
57 static inline void arch_read_lock(arch_rwlock_t *lock) in arch_read_lock() argument
73 : "=m" (*lock), "=&r" (regx) in arch_read_lock()
74 : "m" (*lock) : "memory"); in arch_read_lock()
77 static inline void arch_write_lock(arch_rwlock_t *lock) in arch_write_lock() argument
93 : "=m" (*lock), "=&r" (regx) in arch_write_lock()
94 : "m" (*lock) : "memory"); in arch_write_lock()
97 static inline int arch_read_trylock(arch_rwlock_t * lock) in arch_read_trylock() argument
113 : "=m" (*lock), "=&r" (regx), "=&r" (success) in arch_read_trylock()
114 : "m" (*lock) : "memory"); in arch_read_trylock()
119 static inline int arch_write_trylock(arch_rwlock_t * lock) in arch_write_trylock() argument
135 : "=m" (*lock), "=&r" (regx), "=&r" (success) in arch_write_trylock()
136 : "m" (*lock) : "memory"); in arch_write_trylock()
141 static inline void arch_read_unlock(arch_rwlock_t * lock) in arch_read_unlock() argument
153 : "=m" (*lock), "=&r" (regx) in arch_read_unlock()
154 : "m" (*lock) : "memory"); in arch_read_unlock()
157 static inline void arch_write_unlock(arch_rwlock_t * lock) in arch_write_unlock() argument
160 lock->lock = 0; in arch_write_unlock()