Lines Matching refs:lock
16 #define arch_spin_is_locked(lock) (*((volatile unsigned char *)(lock)) != 0) argument
18 static inline void arch_spin_lock(arch_spinlock_t *lock) in arch_spin_lock() argument
34 : "r" (lock) in arch_spin_lock()
38 static inline int arch_spin_trylock(arch_spinlock_t *lock) in arch_spin_trylock() argument
43 : "r" (lock) in arch_spin_trylock()
48 static inline void arch_spin_unlock(arch_spinlock_t *lock) in arch_spin_unlock() argument
50 __asm__ __volatile__("stb %%g0, [%0]" : : "r" (lock) : "memory"); in arch_spin_unlock()
92 #define arch_read_lock(lock) \ argument
95 __arch_read_lock(lock); \
112 #define arch_read_unlock(lock) \ argument
115 __arch_read_unlock(lock); \
130 *(volatile __u32 *)&lp->lock = ~0U; in arch_write_lock()
133 static inline void arch_write_unlock(arch_rwlock_t *lock) in arch_write_unlock() argument
138 : "r" (lock) in arch_write_unlock()
148 : "r" (&rw->lock) in arch_write_trylock()
152 val = rw->lock & ~0xff; in arch_write_trylock()
154 ((volatile u8*)&rw->lock)[3] = 0; in arch_write_trylock()
156 *(volatile u32*)&rw->lock = ~0U; in arch_write_trylock()
177 #define arch_read_trylock(lock) \ argument
181 res = __arch_read_trylock(lock); \