Lines Matching refs:lock
283 spinlock_t lock; member
293 .lock = __SPIN_LOCK_UNLOCKED(lockname) \
299 spin_lock_init(&(x)->lock); \
325 spin_lock(&sl->lock); in write_seqlock()
332 spin_unlock(&sl->lock); in write_sequnlock()
337 spin_lock_bh(&sl->lock); in write_seqlock_bh()
344 spin_unlock_bh(&sl->lock); in write_sequnlock_bh()
349 spin_lock_irq(&sl->lock); in write_seqlock_irq()
356 spin_unlock_irq(&sl->lock); in write_sequnlock_irq()
363 spin_lock_irqsave(&sl->lock, flags); in __write_seqlock_irqsave()
368 #define write_seqlock_irqsave(lock, flags) \ argument
369 do { flags = __write_seqlock_irqsave(lock); } while (0)
375 spin_unlock_irqrestore(&sl->lock, flags); in write_sequnlock_irqrestore()
385 spin_lock(&sl->lock); in read_seqlock_excl()
390 spin_unlock(&sl->lock); in read_sequnlock_excl()
403 static inline void read_seqbegin_or_lock(seqlock_t *lock, int *seq) in read_seqbegin_or_lock() argument
406 *seq = read_seqbegin(lock); in read_seqbegin_or_lock()
408 read_seqlock_excl(lock); in read_seqbegin_or_lock()
411 static inline int need_seqretry(seqlock_t *lock, int seq) in need_seqretry() argument
413 return !(seq & 1) && read_seqretry(lock, seq); in need_seqretry()
416 static inline void done_seqretry(seqlock_t *lock, int seq) in done_seqretry() argument
419 read_sequnlock_excl(lock); in done_seqretry()
424 spin_lock_bh(&sl->lock); in read_seqlock_excl_bh()
429 spin_unlock_bh(&sl->lock); in read_sequnlock_excl_bh()
434 spin_lock_irq(&sl->lock); in read_seqlock_excl_irq()
439 spin_unlock_irq(&sl->lock); in read_sequnlock_excl_irq()
446 spin_lock_irqsave(&sl->lock, flags); in __read_seqlock_excl_irqsave()
450 #define read_seqlock_excl_irqsave(lock, flags) \ argument
451 do { flags = __read_seqlock_excl_irqsave(lock); } while (0)
456 spin_unlock_irqrestore(&sl->lock, flags); in read_sequnlock_excl_irqrestore()
460 read_seqbegin_or_lock_irqsave(seqlock_t *lock, int *seq) in read_seqbegin_or_lock_irqsave() argument
465 *seq = read_seqbegin(lock); in read_seqbegin_or_lock_irqsave()
467 read_seqlock_excl_irqsave(lock, flags); in read_seqbegin_or_lock_irqsave()
473 done_seqretry_irqrestore(seqlock_t *lock, int seq, unsigned long flags) in done_seqretry_irqrestore() argument
476 read_sequnlock_excl_irqrestore(lock, flags); in done_seqretry_irqrestore()