Lines Matching refs:lock
80 extern int __lockfunc generic__raw_read_trylock(raw_rwlock_t *lock);
92 extern void __spin_lock_init(spinlock_t *lock, const char *name,
94 # define spin_lock_init(lock) \ argument
98 __spin_lock_init((lock), #lock, &__key); \
102 # define spin_lock_init(lock) \ argument
103 do { *(lock) = SPIN_LOCK_UNLOCKED; } while (0)
107 extern void __rwlock_init(rwlock_t *lock, const char *name,
109 # define rwlock_init(lock) \ argument
113 __rwlock_init((lock), #lock, &__key); \
116 # define rwlock_init(lock) \ argument
117 do { *(lock) = RW_LOCK_UNLOCKED; } while (0)
120 #define spin_is_locked(lock) __raw_spin_is_locked(&(lock)->raw_lock) argument
126 #define spin_unlock_wait(lock) __raw_spin_unlock_wait(&(lock)->raw_lock) argument
138 extern void _raw_spin_lock(spinlock_t *lock);
139 #define _raw_spin_lock_flags(lock, flags) _raw_spin_lock(lock) argument
140 extern int _raw_spin_trylock(spinlock_t *lock);
141 extern void _raw_spin_unlock(spinlock_t *lock);
142 extern void _raw_read_lock(rwlock_t *lock);
143 extern int _raw_read_trylock(rwlock_t *lock);
144 extern void _raw_read_unlock(rwlock_t *lock);
145 extern void _raw_write_lock(rwlock_t *lock);
146 extern int _raw_write_trylock(rwlock_t *lock);
147 extern void _raw_write_unlock(rwlock_t *lock);
149 # define _raw_spin_lock(lock) __raw_spin_lock(&(lock)->raw_lock) argument
150 # define _raw_spin_lock_flags(lock, flags) \ argument
151 __raw_spin_lock_flags(&(lock)->raw_lock, *(flags))
152 # define _raw_spin_trylock(lock) __raw_spin_trylock(&(lock)->raw_lock) argument
153 # define _raw_spin_unlock(lock) __raw_spin_unlock(&(lock)->raw_lock) argument
170 #define spin_trylock(lock) __cond_lock(_spin_trylock(lock)) argument
171 #define read_trylock(lock) __cond_lock(_read_trylock(lock)) argument
172 #define write_trylock(lock) __cond_lock(_write_trylock(lock)) argument
174 #define spin_lock(lock) _spin_lock(lock) argument
177 # define spin_lock_nested(lock, subclass) _spin_lock_nested(lock, subclass) argument
179 # define spin_lock_nested(lock, subclass) _spin_lock(lock) argument
182 #define write_lock(lock) _write_lock(lock) argument
183 #define read_lock(lock) _read_lock(lock) argument
186 #define spin_lock_irqsave(lock, flags) flags = _spin_lock_irqsave(lock) argument
187 #define read_lock_irqsave(lock, flags) flags = _read_lock_irqsave(lock) argument
188 #define write_lock_irqsave(lock, flags) flags = _write_lock_irqsave(lock) argument
190 #define spin_lock_irqsave(lock, flags) _spin_lock_irqsave(lock, flags) argument
191 #define read_lock_irqsave(lock, flags) _read_lock_irqsave(lock, flags) argument
192 #define write_lock_irqsave(lock, flags) _write_lock_irqsave(lock, flags) argument
195 #define spin_lock_irq(lock) _spin_lock_irq(lock) argument
196 #define spin_lock_bh(lock) _spin_lock_bh(lock) argument
198 #define read_lock_irq(lock) _read_lock_irq(lock) argument
199 #define read_lock_bh(lock) _read_lock_bh(lock) argument
201 #define write_lock_irq(lock) _write_lock_irq(lock) argument
202 #define write_lock_bh(lock) _write_lock_bh(lock) argument
209 # define spin_unlock(lock) _spin_unlock(lock) argument
210 # define read_unlock(lock) _read_unlock(lock) argument
211 # define write_unlock(lock) _write_unlock(lock) argument
212 # define spin_unlock_irq(lock) _spin_unlock_irq(lock) argument
213 # define read_unlock_irq(lock) _read_unlock_irq(lock) argument
214 # define write_unlock_irq(lock) _write_unlock_irq(lock) argument
216 # define spin_unlock(lock) __raw_spin_unlock(&(lock)->raw_lock) argument
217 # define read_unlock(lock) __raw_read_unlock(&(lock)->raw_lock) argument
218 # define write_unlock(lock) __raw_write_unlock(&(lock)->raw_lock) argument
219 # define spin_unlock_irq(lock) \ argument
220 do { __raw_spin_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0)
221 # define read_unlock_irq(lock) \ argument
222 do { __raw_read_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0)
223 # define write_unlock_irq(lock) \ argument
224 do { __raw_write_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0)
227 #define spin_unlock_irqrestore(lock, flags) \ argument
228 _spin_unlock_irqrestore(lock, flags)
229 #define spin_unlock_bh(lock) _spin_unlock_bh(lock) argument
231 #define read_unlock_irqrestore(lock, flags) \ argument
232 _read_unlock_irqrestore(lock, flags)
233 #define read_unlock_bh(lock) _read_unlock_bh(lock) argument
235 #define write_unlock_irqrestore(lock, flags) \ argument
236 _write_unlock_irqrestore(lock, flags)
237 #define write_unlock_bh(lock) _write_unlock_bh(lock) argument
239 #define spin_trylock_bh(lock) __cond_lock(_spin_trylock_bh(lock)) argument
241 #define spin_trylock_irq(lock) \ argument
244 _spin_trylock(lock) ? \
248 #define spin_trylock_irqsave(lock, flags) \ argument
251 _spin_trylock(lock) ? \
265 extern int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock);
266 #define atomic_dec_and_lock(atomic, lock) \ argument
267 __cond_lock(_atomic_dec_and_lock(atomic, lock))
273 #define spin_can_lock(lock) (!spin_is_locked(lock)) argument