Lines Matching refs:lock
100 struct wakeup_source lock; member
106 struct hif_pm_runtime_lock *lock; member
194 static inline QDF_STATUS __qdf_spinlock_create(__qdf_spinlock_t *lock) in __qdf_spinlock_create() argument
196 spin_lock_init(&lock->spinlock); in __qdf_spinlock_create()
197 lock->flags = 0; in __qdf_spinlock_create()
201 #define __qdf_spinlock_destroy(lock) argument
209 static inline void __qdf_spin_lock(__qdf_spinlock_t *lock) in __qdf_spin_lock() argument
211 spin_lock(&lock->spinlock); in __qdf_spin_lock()
220 static inline void __qdf_spin_unlock(__qdf_spinlock_t *lock) in __qdf_spin_unlock() argument
222 spin_unlock(&lock->spinlock); in __qdf_spin_unlock()
232 static inline void __qdf_spin_lock_irqsave(__qdf_spinlock_t *lock) in __qdf_spin_lock_irqsave() argument
234 spin_lock_irqsave(&lock->spinlock, lock->flags); in __qdf_spin_lock_irqsave()
244 static inline void __qdf_spin_unlock_irqrestore(__qdf_spinlock_t *lock) in __qdf_spin_unlock_irqrestore() argument
246 spin_unlock_irqrestore(&lock->spinlock, lock->flags); in __qdf_spin_unlock_irqrestore()
262 static inline int __qdf_spin_is_locked(__qdf_spinlock_t *lock) in __qdf_spin_is_locked() argument
264 return spin_is_locked(&lock->spinlock); in __qdf_spin_is_locked()
273 static inline int __qdf_spin_trylock_bh(__qdf_spinlock_t *lock) in __qdf_spin_trylock_bh() argument
276 return spin_trylock(&lock->spinlock); in __qdf_spin_trylock_bh()
278 if (spin_trylock_bh(&lock->spinlock)) { in __qdf_spin_trylock_bh()
279 lock->flags |= QDF_LINUX_UNLOCK_BH; in __qdf_spin_trylock_bh()
292 static inline int __qdf_spin_trylock(__qdf_spinlock_t *lock) in __qdf_spin_trylock() argument
294 return spin_trylock(&lock->spinlock); in __qdf_spin_trylock()
303 static inline void __qdf_spin_lock_bh(__qdf_spinlock_t *lock) in __qdf_spin_lock_bh() argument
306 spin_lock(&lock->spinlock); in __qdf_spin_lock_bh()
308 spin_lock_bh(&lock->spinlock); in __qdf_spin_lock_bh()
309 lock->flags |= QDF_LINUX_UNLOCK_BH; in __qdf_spin_lock_bh()
319 static inline void __qdf_spin_unlock_bh(__qdf_spinlock_t *lock) in __qdf_spin_unlock_bh() argument
321 if (unlikely(lock->flags & QDF_LINUX_UNLOCK_BH)) { in __qdf_spin_unlock_bh()
322 lock->flags &= (unsigned long)~QDF_LINUX_UNLOCK_BH; in __qdf_spin_unlock_bh()
323 spin_unlock_bh(&lock->spinlock); in __qdf_spin_unlock_bh()
325 spin_unlock(&lock->spinlock); in __qdf_spin_unlock_bh()
339 __qdf_spinlock_t *lock, in __qdf_spinlock_irq_exec() argument
346 spin_lock_irqsave(&lock->spinlock, flags); in __qdf_spinlock_irq_exec()
348 spin_unlock_irqrestore(&lock->spinlock, flags); in __qdf_spinlock_irq_exec()