• Home
  • Raw
  • Download

Lines Matching refs:lock

17 static inline void arch_spin_unlock(arch_spinlock_t *lock)  in arch_spin_unlock()  argument
20 : "=m" (lock->slock) \ in arch_spin_unlock()
25 static inline void arch_spin_unlock_wait(arch_spinlock_t *lock) in arch_spin_unlock_wait() argument
27 while (arch_spin_is_locked(lock)) in arch_spin_unlock_wait()
31 static inline int arch_spin_trylock(arch_spinlock_t *lock) in arch_spin_trylock() argument
33 return cris_spin_trylock((void *)&lock->slock); in arch_spin_trylock()
36 static inline void arch_spin_lock(arch_spinlock_t *lock) in arch_spin_lock() argument
38 cris_spin_lock((void *)&lock->slock); in arch_spin_lock()
42 arch_spin_lock_flags(arch_spinlock_t *lock, unsigned long flags) in arch_spin_lock_flags() argument
44 arch_spin_lock(lock); in arch_spin_lock_flags()
61 return (int)(x)->lock > 0; in arch_read_can_lock()
66 return (x)->lock == RW_LOCK_BIAS; in arch_write_can_lock()
72 while (rw->lock == 0); in arch_read_lock()
73 rw->lock--; in arch_read_lock()
80 while (rw->lock != RW_LOCK_BIAS); in arch_write_lock()
81 rw->lock = 0; in arch_write_lock()
88 rw->lock++; in arch_read_unlock()
95 while (rw->lock != RW_LOCK_BIAS); in arch_write_unlock()
96 rw->lock = RW_LOCK_BIAS; in arch_write_unlock()
104 if (rw->lock != 0) { in arch_read_trylock()
105 rw->lock--; in arch_read_trylock()
116 if (rw->lock == RW_LOCK_BIAS) { in arch_write_trylock()
117 rw->lock = 0; in arch_write_trylock()
124 #define _raw_read_lock_flags(lock, flags) _raw_read_lock(lock) argument
125 #define _raw_write_lock_flags(lock, flags) _raw_write_lock(lock) argument
127 #define arch_spin_relax(lock) cpu_relax() argument
128 #define arch_read_relax(lock) cpu_relax() argument
129 #define arch_write_relax(lock) cpu_relax() argument