/include/linux/ |
H A D | spinlock_api_up.h | 19 #define assert_raw_spin_locked(lock) do { (void)(lock); } while (0) 24 * flags straight, to suppress compiler warnings of unused lock 27 #define __LOCK(lock) \ 28 do { preempt_disable(); __acquire(lock); (void)(lock); } while (0) 30 #define __LOCK_BH(lock) \ 31 do { local_bh_disable(); __LOCK(lock); } while (0) 33 #define __LOCK_IRQ(lock) \ 34 do { local_irq_disable(); __LOCK(lock); } whil [all...] |
H A D | spinlock_up.h | 25 static inline void arch_spin_lock(arch_spinlock_t *lock) argument 27 lock->slock = 0; 31 arch_spin_lock_flags(arch_spinlock_t *lock, unsigned long flags) argument 34 lock->slock = 0; 37 static inline int arch_spin_trylock(arch_spinlock_t *lock) argument 39 char oldval = lock->slock; 41 lock->slock = 0; 46 static inline void arch_spin_unlock(arch_spinlock_t *lock) argument 48 lock->slock = 1; 54 #define arch_read_lock(lock) d [all...] |
H A D | spinlock.h | 64 #define LOCK_SECTION_NAME ".text..lock."KBUILD_BASENAME 93 extern void __raw_spin_lock_init(raw_spinlock_t *lock, const char *name, 95 # define raw_spin_lock_init(lock) \ 99 __raw_spin_lock_init((lock), #lock, &__key); \ 103 # define raw_spin_lock_init(lock) \ 104 do { *(lock) = __RAW_SPIN_LOCK_UNLOCKED(lock); } while (0) 107 #define raw_spin_is_locked(lock) arch_spin_is_locked(&(lock) 132 extern void do_raw_spin_lock(raw_spinlock_t *lock) __acquires(lock); variable 135 extern void do_raw_spin_unlock(raw_spinlock_t *lock) __releases(lock); variable 150 do_raw_spin_trylock(raw_spinlock_t *lock) argument 272 spinlock_check(spinlock_t *lock) argument 283 spin_lock(spinlock_t *lock) argument 288 spin_lock_bh(spinlock_t *lock) argument 293 spin_trylock(spinlock_t *lock) argument 308 spin_lock_irq(spinlock_t *lock) argument 323 spin_unlock(spinlock_t *lock) argument 328 spin_unlock_bh(spinlock_t *lock) argument 333 spin_unlock_irq(spinlock_t *lock) argument 338 spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags) argument 343 spin_trylock_bh(spinlock_t *lock) argument 348 spin_trylock_irq(spinlock_t *lock) argument 358 spin_unlock_wait(spinlock_t *lock) argument 363 spin_is_locked(spinlock_t *lock) argument 368 spin_is_contended(spinlock_t *lock) argument 373 spin_can_lock(spinlock_t *lock) argument [all...] |
H A D | rwlock_api_smp.h | 18 void __lockfunc _raw_read_lock(rwlock_t *lock) __acquires(lock); variable 19 void __lockfunc _raw_write_lock(rwlock_t *lock) __acquires(lock); variable 20 void __lockfunc _raw_read_lock_bh(rwlock_t *lock) __acquires(lock); variable 21 void __lockfunc _raw_write_lock_bh(rwlock_t *lock) __acquires(lock); variable 22 void __lockfunc _raw_read_lock_irq(rwlock_t *lock) __acquires(lock); variable 23 void __lockfunc _raw_write_lock_irq(rwlock_t *lock) __acquires(lock); variable 25 __acquires(lock); variable 27 __acquires(lock); variable 30 void __lockfunc _raw_read_unlock(rwlock_t *lock) __releases(lock); variable 31 void __lockfunc _raw_write_unlock(rwlock_t *lock) __releases(lock); variable 32 void __lockfunc _raw_read_unlock_bh(rwlock_t *lock) __releases(lock); variable 33 void __lockfunc _raw_write_unlock_bh(rwlock_t *lock) __releases(lock); variable 34 void __lockfunc _raw_read_unlock_irq(rwlock_t *lock) __releases(lock); variable 35 void __lockfunc _raw_write_unlock_irq(rwlock_t *lock) __releases(lock); variable 38 __releases(lock); variable 41 __releases(lock); variable 117 __raw_read_trylock(rwlock_t *lock) argument 128 __raw_write_trylock(rwlock_t *lock) argument 146 __raw_read_lock(rwlock_t *lock) argument 153 __raw_read_lock_irqsave(rwlock_t *lock) argument 165 __raw_read_lock_irq(rwlock_t *lock) argument 173 __raw_read_lock_bh(rwlock_t *lock) argument 181 __raw_write_lock_irqsave(rwlock_t *lock) argument 193 __raw_write_lock_irq(rwlock_t *lock) argument 201 __raw_write_lock_bh(rwlock_t *lock) argument 209 __raw_write_lock(rwlock_t *lock) argument 218 __raw_write_unlock(rwlock_t *lock) argument 225 __raw_read_unlock(rwlock_t *lock) argument 233 __raw_read_unlock_irqrestore(rwlock_t *lock, unsigned long flags) argument 241 __raw_read_unlock_irq(rwlock_t *lock) argument 249 __raw_read_unlock_bh(rwlock_t *lock) argument 257 __raw_write_unlock_irqrestore(rwlock_t *lock, unsigned long flags) argument 266 __raw_write_unlock_irq(rwlock_t *lock) argument 274 __raw_write_unlock_bh(rwlock_t *lock) argument [all...] |
H A D | rwlock.h | 18 extern void __rwlock_init(rwlock_t *lock, const char *name, 20 # define rwlock_init(lock) \ 24 __rwlock_init((lock), #lock, &__key); \ 27 # define rwlock_init(lock) \ 28 do { *(lock) = __RW_LOCK_UNLOCKED(lock); } while (0) 32 extern void do_raw_read_lock(rwlock_t *lock) __acquires(lock); variable 33 #define do_raw_read_lock_flags(lock, flag 35 extern void do_raw_read_unlock(rwlock_t *lock) __releases(lock); variable 36 extern void do_raw_write_lock(rwlock_t *lock) __acquires(lock); variable 39 extern void do_raw_write_unlock(rwlock_t *lock) __releases(lock); variable [all...] |
H A D | spinlock_api_smp.h | 22 void __lockfunc _raw_spin_lock(raw_spinlock_t *lock) __acquires(lock); variable 23 void __lockfunc _raw_spin_lock_nested(raw_spinlock_t *lock, int subclass) 24 __acquires(lock); variable 26 _raw_spin_lock_nest_lock(raw_spinlock_t *lock, struct lockdep_map *map) 27 __acquires(lock); variable 28 void __lockfunc _raw_spin_lock_bh(raw_spinlock_t *lock) __acquires(lock); variable 29 void __lockfunc _raw_spin_lock_irq(raw_spinlock_t *lock) 30 __acquires(lock); variable 33 __acquires(lock); variable 36 __acquires(lock); variable 39 void __lockfunc _raw_spin_unlock(raw_spinlock_t *lock) __releases(lock); variable 40 void __lockfunc _raw_spin_unlock_bh(raw_spinlock_t *lock) __releases(lock); variable 41 void __lockfunc _raw_spin_unlock_irq(raw_spinlock_t *lock) __releases(lock); variable 44 __releases(lock); variable 86 __raw_spin_trylock(raw_spinlock_t *lock) argument 104 __raw_spin_lock_irqsave(raw_spinlock_t *lock) argument 124 __raw_spin_lock_irq(raw_spinlock_t *lock) argument 132 __raw_spin_lock_bh(raw_spinlock_t *lock) argument 140 __raw_spin_lock(raw_spinlock_t *lock) argument 149 __raw_spin_unlock(raw_spinlock_t *lock) argument 156 __raw_spin_unlock_irqrestore(raw_spinlock_t *lock, unsigned long flags) argument 165 __raw_spin_unlock_irq(raw_spinlock_t *lock) argument 173 __raw_spin_unlock_bh(raw_spinlock_t *lock) argument 181 __raw_spin_trylock_bh(raw_spinlock_t *lock) argument [all...] |
H A D | wakelock.h | 36 static inline void wake_lock_init(struct wake_lock *lock, int type, argument 39 wakeup_source_init(&lock->ws, name); 42 static inline void wake_lock_destroy(struct wake_lock *lock) argument 44 wakeup_source_trash(&lock->ws); 47 static inline void wake_lock(struct wake_lock *lock) argument 49 __pm_stay_awake(&lock->ws); 52 static inline void wake_lock_timeout(struct wake_lock *lock, long timeout) argument 54 __pm_wakeup_event(&lock->ws, jiffies_to_msecs(timeout)); 57 static inline void wake_unlock(struct wake_lock *lock) argument 59 __pm_relax(&lock 62 wake_lock_active(struct wake_lock *lock) argument [all...] |
H A D | mutex.h | 38 * that make lock debugging easier and faster: 95 static inline void mutex_destroy(struct mutex *lock) {} argument 115 extern void __mutex_init(struct mutex *lock, const char *name, 120 * @lock: the mutex to be queried 124 static inline int mutex_is_locked(struct mutex *lock) argument 126 return atomic_read(&lock->count) != 1; 134 extern void mutex_lock_nested(struct mutex *lock, unsigned int subclass); 135 extern void _mutex_lock_nest_lock(struct mutex *lock, struct lockdep_map *nest_lock); 136 extern int __must_check mutex_lock_interruptible_nested(struct mutex *lock, 138 extern int __must_check mutex_lock_killable_nested(struct mutex *lock, [all...] |
H A D | seqlock.h | 5 * lock for data where the reader wants a consistent set of information 35 spinlock_t lock; member in struct:__anon1178 48 spin_lock_init(&(x)->lock); \ 60 spin_lock(&sl->lock); 69 spin_unlock(&sl->lock); 74 int ret = spin_trylock(&sl->lock); 258 #define write_seqlock_irqsave(lock, flags) \ 259 do { local_irq_save(flags); write_seqlock(lock); } while (0) 260 #define write_seqlock_irq(lock) \ 261 do { local_irq_disable(); write_seqlock(lock); } whil [all...] |
H A D | rtmutex.h | 78 * @lock: the mutex to be queried 82 static inline int rt_mutex_is_locked(struct rt_mutex *lock) argument 84 return lock->owner != NULL; 87 extern void __rt_mutex_init(struct rt_mutex *lock, const char *name); 88 extern void rt_mutex_destroy(struct rt_mutex *lock); 90 extern void rt_mutex_lock(struct rt_mutex *lock); 91 extern int rt_mutex_lock_interruptible(struct rt_mutex *lock, 93 extern int rt_mutex_timed_lock(struct rt_mutex *lock, 97 extern int rt_mutex_trylock(struct rt_mutex *lock); 99 extern void rt_mutex_unlock(struct rt_mutex *lock); [all...] |
H A D | lockdep.h | 40 * on rq->lock. double_rq_lock() acquires this highly competitive with 48 * static locks we use the lock address itself as the key.) 63 * The lock-class itself: 72 * global list of all lock-classes: 87 * These fields represent a directed graph of lock dependencies, 147 * Map the lock object (the lock instance) to the lock-class object. 148 * This is embedded into specific lock instances: 161 * Every lock ha 294 lockdep_match_key(struct lockdep_map *lock, struct lock_class_key *key) argument 330 lock_set_subclass(struct lockdep_map *lock, unsigned int subclass, unsigned long ip) argument [all...] |
H A D | res_counter.h | 46 * the lock to protect all of the above. 49 spinlock_t lock; member in struct:res_counter 111 * counter->limit _locked call expects the counter->lock to be taken 132 * _locked call expects the counter->lock to be taken 150 spin_lock_irqsave(&cnt->lock, flags); 155 spin_unlock_irqrestore(&cnt->lock, flags); 172 spin_lock_irqsave(&cnt->lock, flags); 177 spin_unlock_irqrestore(&cnt->lock, flags); 185 spin_lock_irqsave(&cnt->lock, flags); 187 spin_unlock_irqrestore(&cnt->lock, flag [all...] |
H A D | fs_struct.h | 10 spinlock_t lock; member in struct:fs_struct 29 spin_lock(&fs->lock); 32 spin_unlock(&fs->lock); 37 spin_lock(&fs->lock); 40 spin_unlock(&fs->lock); 46 spin_lock(&fs->lock); 51 spin_unlock(&fs->lock);
|
H A D | blockgroup_lock.h | 37 spinlock_t lock; member in struct:bgl_lock 49 spin_lock_init(&bgl->locks[i].lock); 59 return &bgl->locks[(block_group) & (NR_BG_LOCKS-1)].lock;
|
H A D | lglock.h | 27 /* can make br locks by using local lock for read side, global lock for write */ 105 arch_spinlock_t *lock; \ 106 lock = &per_cpu(name##_lock, i); \ 107 *lock = (arch_spinlock_t)__ARCH_SPIN_LOCK_UNLOCKED; \ 118 arch_spinlock_t *lock; \ 121 lock = &__get_cpu_var(name##_lock); \ 122 arch_spin_lock(lock); \ 127 arch_spinlock_t *lock; \ 129 lock [all...] |
H A D | semaphore.h | 17 raw_spinlock_t lock; member in struct:semaphore 24 .lock = __RAW_SPIN_LOCK_UNLOCKED((name).lock), \ 36 lockdep_init_map(&sem->lock.dep_map, "semaphore->lock", &__key, 0);
|
H A D | mutex-debug.h | 21 extern void mutex_destroy(struct mutex *lock);
|
H A D | proportions.h | 61 raw_spinlock_t lock; /* protect the snapshot state */ member in struct:prop_local_percpu 109 * and a lock protecting this state 113 raw_spinlock_t lock; /* protect the snapshot state */ member in struct:prop_local_single 117 { .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \
|
H A D | ratelimit.h | 11 raw_spinlock_t lock; /* protect the state */ member in struct:ratelimit_state 23 .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \ 31 raw_spin_lock_init(&rs->lock);
|
/include/drm/ttm/ |
H A D | ttm_lock.h | 33 * of the DRM heavyweight hardware lock. 34 * The lock is a read-write lock. Taking it in read mode and write mode 39 * It's allowed to leave kernel space with the vt lock held. 40 * If a user-space process dies while having the vt-lock, 41 * it will be released during the file descriptor release. The vt lock 42 * excludes write lock and read lock. 44 * The suspend mode is used to lock out all TTM users when preparing for 59 * @base: ttm base object used solely to release the lock i 72 spinlock_t lock; member in struct:ttm_lock 239 ttm_lock_set_kill(struct ttm_lock *lock, bool val, int signal) argument [all...] |
H A D | ttm_memory.h | 64 * @lock: Lock to protect the @shrink - and the memory accounting members, 84 spinlock_t lock; member in struct:ttm_mem_global 121 spin_lock(&glob->lock); 123 spin_unlock(&glob->lock); 127 spin_unlock(&glob->lock); 142 spin_lock(&glob->lock); 145 spin_unlock(&glob->lock);
|
/include/asm-generic/bitops/ |
H A D | ext2-atomic.h | 8 #define ext2_set_bit_atomic(lock, nr, addr) \ 11 spin_lock(lock); \ 13 spin_unlock(lock); \ 17 #define ext2_clear_bit_atomic(lock, nr, addr) \ 20 spin_lock(lock); \ 22 spin_unlock(lock); \
|
/include/trace/events/ |
H A D | lock.h | 2 #define TRACE_SYSTEM lock 14 TP_PROTO(struct lockdep_map *lock, unsigned int subclass, 18 TP_ARGS(lock, subclass, trylock, read, check, next_lock, ip), 22 __string(name, lock->name) 28 __assign_str(name, lock->name); 29 __entry->lockdep_addr = lock; 38 DECLARE_EVENT_CLASS(lock, 40 TP_PROTO(struct lockdep_map *lock, unsigned long ip), 42 TP_ARGS(lock, ip), 45 __string( name, lock [all...] |
/include/net/irda/ |
H A D | irmod.h | 84 LINK_STATUS link, LOCK_STATUS lock); 95 * Those function basically return false if the lock is already in the 97 #define irda_lock(lock) (! test_and_set_bit(0, (void *) (lock))) 98 #define irda_unlock(lock) (test_and_clear_bit(0, (void *) (lock)))
|
/include/net/bluetooth/ |
H A D | sco.h | 62 spinlock_t lock; member in struct:sco_conn 68 #define sco_conn_lock(c) spin_lock(&c->lock); 69 #define sco_conn_unlock(c) spin_unlock(&c->lock);
|