/linux/include/linux/ |
A D | spinlock_api_up.h | 27 #define ___LOCK(lock) \ argument 30 #define __LOCK(lock) \ argument 33 #define __LOCK_BH(lock) \ argument 36 #define __LOCK_IRQ(lock) \ argument 39 #define __LOCK_IRQSAVE(lock, flags) \ argument 42 #define ___UNLOCK(lock) \ argument 45 #define __UNLOCK(lock) \ argument 48 #define __UNLOCK_BH(lock) \ argument 52 #define __UNLOCK_IRQ(lock) \ argument 55 #define __UNLOCK_IRQRESTORE(lock, flags) \ argument [all …]
|
A D | rwlock_api_smp.h | 44 #define _raw_read_lock(lock) __raw_read_lock(lock) argument 48 #define _raw_write_lock(lock) __raw_write_lock(lock) argument 84 #define _raw_read_unlock(lock) __raw_read_unlock(lock) argument 108 #define _raw_read_unlock_irqrestore(lock, flags) \ argument 113 #define _raw_write_unlock_irqrestore(lock, flags) \ argument 117 static inline int __raw_read_trylock(rwlock_t *lock) in __raw_read_trylock() 128 static inline int __raw_write_trylock(rwlock_t *lock) in __raw_write_trylock() 146 static inline void __raw_read_lock(rwlock_t *lock) in __raw_read_lock() 172 static inline void __raw_read_lock_bh(rwlock_t *lock) in __raw_read_lock_bh() 205 static inline void __raw_write_lock(rwlock_t *lock) in __raw_write_lock() [all …]
|
A D | spinlock.h | 102 # define raw_spin_lock_init(lock) \ argument 110 # define raw_spin_lock_init(lock) \ argument 239 #define raw_spin_lock_irqsave(lock, flags) \ argument 261 #define raw_spin_lock_irqsave(lock, flags) \ argument 284 #define raw_spin_trylock_bh(lock) \ argument 287 #define raw_spin_trylock_irq(lock) \ argument 329 # define spin_lock_init(lock) \ argument 362 #define spin_lock_nested(lock, subclass) \ argument 377 #define spin_lock_irqsave(lock, flags) \ argument 417 #define spin_trylock_irqsave(lock, flags) \ argument [all …]
|
A D | rwlock.h | 20 # define rwlock_init(lock) \ argument 27 # define rwlock_init(lock) \ argument 55 #define write_lock(lock) _raw_write_lock(lock) argument 56 #define read_lock(lock) _raw_read_lock(lock) argument 60 #define read_lock_irqsave(lock, flags) \ argument 65 #define write_lock_irqsave(lock, flags) \ argument 73 #define read_lock_irqsave(lock, flags) \ argument 78 #define write_lock_irqsave(lock, flags) \ argument 95 #define read_unlock_irqrestore(lock, flags) \ argument 109 #define write_trylock_irqsave(lock, flags) \ argument [all …]
|
A D | spinlock_api_smp.h | 47 #define _raw_spin_lock(lock) __raw_spin_lock(lock) argument 51 #define _raw_spin_lock_bh(lock) __raw_spin_lock_bh(lock) argument 55 #define _raw_spin_lock_irq(lock) __raw_spin_lock_irq(lock) argument 63 #define _raw_spin_trylock(lock) __raw_spin_trylock(lock) argument 71 #define _raw_spin_unlock(lock) __raw_spin_unlock(lock) argument 75 #define _raw_spin_unlock_bh(lock) __raw_spin_unlock_bh(lock) argument 86 static inline int __raw_spin_trylock(raw_spinlock_t *lock) in __raw_spin_trylock() 115 static inline void __raw_spin_lock_irq(raw_spinlock_t *lock) in __raw_spin_lock_irq() 123 static inline void __raw_spin_lock_bh(raw_spinlock_t *lock) in __raw_spin_lock_bh() 130 static inline void __raw_spin_lock(raw_spinlock_t *lock) in __raw_spin_lock() [all …]
|
A D | spinlock_rt.h | 49 # define __spin_lock_nested(lock, subclass) \ argument 52 # define __spin_lock_nest_lock(lock, nest_lock) \ argument 76 #define spin_lock_nested(lock, subclass) \ argument 79 #define spin_lock_nest_lock(lock, nest_lock) \ argument 97 #define spin_lock_irqsave(lock, flags) \ argument 126 #define spin_trylock(lock) \ argument 129 #define spin_trylock_bh(lock) \ argument 132 #define spin_trylock_irq(lock) \ argument 135 #define __spin_trylock_irqsave(lock, flags) \ argument 145 #define spin_trylock_irqsave(lock, flags) \ argument [all …]
|
A D | spinlock_up.h | 29 static inline void arch_spin_lock(arch_spinlock_t *lock) in arch_spin_lock() 35 static inline int arch_spin_trylock(arch_spinlock_t *lock) in arch_spin_trylock() 45 static inline void arch_spin_unlock(arch_spinlock_t *lock) in arch_spin_unlock() 54 #define arch_read_lock(lock) do { barrier(); (void)(lock); } while (0) argument 55 #define arch_write_lock(lock) do { barrier(); (void)(lock); } while (0) argument 56 #define arch_read_trylock(lock) ({ barrier(); (void)(lock); 1; }) argument 57 #define arch_write_trylock(lock) ({ barrier(); (void)(lock); 1; }) argument 62 #define arch_spin_is_locked(lock) ((void)(lock), 0) argument 64 # define arch_spin_lock(lock) do { barrier(); (void)(lock); } while (0) argument 66 # define arch_spin_trylock(lock) ({ barrier(); (void)(lock); 1; }) argument [all …]
|
A D | local_lock.h | 10 #define local_lock_init(lock) __local_lock_init(lock) argument 16 #define local_lock(lock) __local_lock(lock) argument 22 #define local_lock_irq(lock) __local_lock_irq(lock) argument 30 #define local_lock_irqsave(lock, flags) \ argument 37 #define local_unlock(lock) __local_unlock(lock) argument 43 #define local_unlock_irq(lock) __local_unlock_irq(lock) argument 51 #define local_unlock_irqrestore(lock, flags) \ argument
|
A D | local_lock_internal.h | 54 #define __local_lock_init(lock) \ argument 65 #define __local_lock(lock) \ argument 71 #define __local_lock_irq(lock) \ argument 77 #define __local_lock_irqsave(lock, flags) \ argument 83 #define __local_unlock(lock) \ argument 89 #define __local_unlock_irq(lock) \ argument 95 #define __local_unlock_irqrestore(lock, flags) \ argument 122 #define __local_lock_irq(lock) __local_lock(lock) argument 124 #define __local_lock_irqsave(lock, flags) \ argument 137 #define __local_unlock_irq(lock) __local_unlock(lock) argument [all …]
|
A D | mutex.h | 89 static inline void mutex_destroy(struct mutex *lock) {} in mutex_destroy() 155 static inline void mutex_destroy(struct mutex *lock) { } in mutex_destroy() 187 #define mutex_lock(lock) mutex_lock_nested(lock, 0) argument 188 #define mutex_lock_interruptible(lock) mutex_lock_interruptible_nested(lock, 0) argument 189 #define mutex_lock_killable(lock) mutex_lock_killable_nested(lock, 0) argument 190 #define mutex_lock_io(lock) mutex_lock_io_nested(lock, 0) argument 192 #define mutex_lock_nest_lock(lock, nest_lock) \ argument 204 # define mutex_lock_nested(lock, subclass) mutex_lock(lock) argument 206 # define mutex_lock_killable_nested(lock, subclass) mutex_lock_killable(lock) argument 207 # define mutex_lock_nest_lock(lock, nest_lock) mutex_lock(lock) argument [all …]
|
/linux/kernel/locking/ |
A D | spinlock.c | 152 void __lockfunc _raw_spin_lock(raw_spinlock_t *lock) in _raw_spin_lock() 218 int __lockfunc _raw_read_trylock(rwlock_t *lock) in _raw_read_trylock() 226 void __lockfunc _raw_read_lock(rwlock_t *lock) in _raw_read_lock() 242 void __lockfunc _raw_read_lock_irq(rwlock_t *lock) in _raw_read_lock_irq() 250 void __lockfunc _raw_read_lock_bh(rwlock_t *lock) in _raw_read_lock_bh() 258 void __lockfunc _raw_read_unlock(rwlock_t *lock) in _raw_read_unlock() 282 void __lockfunc _raw_read_unlock_bh(rwlock_t *lock) in _raw_read_unlock_bh() 290 int __lockfunc _raw_write_trylock(rwlock_t *lock) in _raw_write_trylock() 298 void __lockfunc _raw_write_lock(rwlock_t *lock) in _raw_write_lock() 322 void __lockfunc _raw_write_lock_bh(rwlock_t *lock) in _raw_write_lock_bh() [all …]
|
A D | mutex.c | 86 bool mutex_is_locked(struct mutex *lock) in mutex_is_locked() 147 static inline bool __mutex_trylock(struct mutex *lock) in __mutex_trylock() 278 void __sched mutex_lock(struct mutex *lock) in mutex_lock() 541 void __sched mutex_unlock(struct mutex *lock) in mutex_unlock() 562 void __sched ww_mutex_unlock(struct ww_mutex *lock) in ww_mutex_unlock() 994 int __sched mutex_lock_killable(struct mutex *lock) in mutex_lock_killable() 1015 void __sched mutex_lock_io(struct mutex *lock) in mutex_lock_io() 1026 __mutex_lock_slowpath(struct mutex *lock) in __mutex_lock_slowpath() 1032 __mutex_lock_killable_slowpath(struct mutex *lock) in __mutex_lock_killable_slowpath() 1038 __mutex_lock_interruptible_slowpath(struct mutex *lock) in __mutex_lock_interruptible_slowpath() [all …]
|
A D | spinlock_debug.c | 35 void __rwlock_init(rwlock_t *lock, const char *name, in __rwlock_init() 83 debug_spin_lock_before(raw_spinlock_t *lock) in debug_spin_lock_before() 112 void do_raw_spin_lock(raw_spinlock_t *lock) in do_raw_spin_lock() 120 int do_raw_spin_trylock(raw_spinlock_t *lock) in do_raw_spin_trylock() 137 void do_raw_spin_unlock(raw_spinlock_t *lock) in do_raw_spin_unlock() 158 void do_raw_read_lock(rwlock_t *lock) in do_raw_read_lock() 164 int do_raw_read_trylock(rwlock_t *lock) in do_raw_read_trylock() 177 void do_raw_read_unlock(rwlock_t *lock) in do_raw_read_unlock() 207 void do_raw_write_lock(rwlock_t *lock) in do_raw_write_lock() 214 int do_raw_write_trylock(rwlock_t *lock) in do_raw_write_trylock() [all …]
|
A D | rtmutex_api.c | 62 void __sched rt_mutex_lock(struct rt_mutex *lock) in rt_mutex_lock() 78 int __sched rt_mutex_lock_interruptible(struct rt_mutex *lock) in rt_mutex_lock_interruptible() 96 int __sched rt_mutex_trylock(struct rt_mutex *lock) in rt_mutex_trylock() 116 void __sched rt_mutex_unlock(struct rt_mutex *lock) in rt_mutex_unlock() 505 void __sched _mutex_lock_nest_lock(struct mutex *lock, in _mutex_lock_nest_lock() 540 void __sched mutex_lock(struct mutex *lock) in mutex_lock() 546 int __sched mutex_lock_interruptible(struct mutex *lock) in mutex_lock_interruptible() 552 int __sched mutex_lock_killable(struct mutex *lock) in mutex_lock_killable() 558 void __sched mutex_lock_io(struct mutex *lock) in mutex_lock_io() 568 int __sched mutex_trylock(struct mutex *lock) in mutex_trylock() [all …]
|
A D | ww_mutex.h | 9 __ww_waiter_first(struct mutex *lock) in __ww_waiter_first() 41 __ww_waiter_last(struct mutex *lock) in __ww_waiter_last() 62 __ww_mutex_owner(struct mutex *lock) in __ww_mutex_owner() 68 __ww_mutex_has_waiters(struct mutex *lock) in __ww_mutex_has_waiters() 73 static inline void lock_wait_lock(struct mutex *lock) in lock_wait_lock() 94 __ww_waiter_first(struct rt_mutex *lock) in __ww_waiter_first() 121 __ww_waiter_last(struct rt_mutex *lock) in __ww_waiter_last() 136 __ww_mutex_owner(struct rt_mutex *lock) in __ww_mutex_owner() 142 __ww_mutex_has_waiters(struct rt_mutex *lock) in __ww_mutex_has_waiters() 300 static bool __ww_mutex_wound(struct MUTEX *lock, in __ww_mutex_wound() [all …]
|
A D | rtmutex.c | 34 struct rt_mutex *lock, in __ww_mutex_add_waiter() 40 static inline void __ww_mutex_check_waiters(struct rt_mutex *lock, in __ww_mutex_check_waiters() 45 static inline void ww_mutex_lock_acquired(struct ww_mutex *lock, in ww_mutex_lock_acquired() 50 static inline int __ww_mutex_check_kill(struct rt_mutex *lock, in __ww_mutex_check_kill() 584 struct rt_mutex_base *lock; in rt_mutex_adjust_prio_chain() local 1190 struct rt_mutex_base *lock) in mark_wakeup_next_waiter() 1356 static bool rtmutex_spin_on_owner(struct rt_mutex_base *lock, in rtmutex_spin_on_owner() 1394 static bool rtmutex_spin_on_owner(struct rt_mutex_base *lock, in rtmutex_spin_on_owner() 1415 static void __sched remove_waiter(struct rt_mutex_base *lock, in remove_waiter() 1557 static int __sched __rt_mutex_slowlock(struct rt_mutex_base *lock, in __rt_mutex_slowlock() [all …]
|
A D | mutex-debug.c | 28 void debug_mutex_lock_common(struct mutex *lock, struct mutex_waiter *waiter) in debug_mutex_lock_common() 36 void debug_mutex_wake_waiter(struct mutex *lock, struct mutex_waiter *waiter) in debug_mutex_wake_waiter() 50 void debug_mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter, in debug_mutex_add_waiter() 59 void debug_mutex_remove_waiter(struct mutex *lock, struct mutex_waiter *waiter, in debug_mutex_remove_waiter() 71 void debug_mutex_unlock(struct mutex *lock) in debug_mutex_unlock() 79 void debug_mutex_init(struct mutex *lock, const char *name, in debug_mutex_init() 100 void mutex_destroy(struct mutex *lock) in mutex_destroy()
|
/linux/arch/alpha/include/asm/ |
A D | spinlock.h | 19 static inline int arch_spin_value_unlocked(arch_spinlock_t lock) in arch_spin_value_unlocked() 24 static inline void arch_spin_unlock(arch_spinlock_t * lock) in arch_spin_unlock() 30 static inline void arch_spin_lock(arch_spinlock_t * lock) in arch_spin_lock() 50 static inline int arch_spin_trylock(arch_spinlock_t *lock) in arch_spin_trylock() 57 static inline void arch_read_lock(arch_rwlock_t *lock) in arch_read_lock() 77 static inline void arch_write_lock(arch_rwlock_t *lock) in arch_write_lock() 97 static inline int arch_read_trylock(arch_rwlock_t * lock) in arch_read_trylock() 119 static inline int arch_write_trylock(arch_rwlock_t * lock) in arch_write_trylock() 141 static inline void arch_read_unlock(arch_rwlock_t * lock) in arch_read_unlock() 157 static inline void arch_write_unlock(arch_rwlock_t * lock) in arch_write_unlock()
|
/linux/arch/ia64/include/asm/ |
A D | spinlock.h | 43 static __always_inline void __ticket_spin_lock(arch_spinlock_t *lock) in __ticket_spin_lock() 82 static inline int __ticket_spin_is_locked(arch_spinlock_t *lock) in __ticket_spin_is_locked() 89 static inline int __ticket_spin_is_contended(arch_spinlock_t *lock) in __ticket_spin_is_contended() 101 static inline int arch_spin_is_locked(arch_spinlock_t *lock) in arch_spin_is_locked() 106 static inline int arch_spin_is_contended(arch_spinlock_t *lock) in arch_spin_is_contended() 112 static __always_inline void arch_spin_lock(arch_spinlock_t *lock) in arch_spin_lock() 117 static __always_inline int arch_spin_trylock(arch_spinlock_t *lock) in arch_spin_trylock() 122 static __always_inline void arch_spin_unlock(arch_spinlock_t *lock) in arch_spin_unlock() 130 arch_read_lock(arch_rwlock_t *lock) in arch_read_lock() 179 arch_write_lock(arch_rwlock_t *lock) in arch_write_lock() [all …]
|
/linux/arch/powerpc/include/asm/ |
A D | simple_spinlock.h | 39 static inline int arch_spin_is_locked(arch_spinlock_t *lock) in arch_spin_is_locked() 68 static inline int arch_spin_trylock(arch_spinlock_t *lock) in arch_spin_trylock() 92 static inline void splpar_spin_yield(arch_spinlock_t *lock) {} in splpar_spin_yield() 93 static inline void splpar_rw_yield(arch_rwlock_t *lock) {} in splpar_rw_yield() 96 static inline void spin_yield(arch_spinlock_t *lock) in spin_yield() 104 static inline void rw_yield(arch_rwlock_t *lock) in rw_yield() 112 static inline void arch_spin_lock(arch_spinlock_t *lock) in arch_spin_lock() 126 static inline void arch_spin_unlock(arch_spinlock_t *lock) in arch_spin_unlock() 259 #define arch_spin_relax(lock) spin_yield(lock) argument 260 #define arch_read_relax(lock) rw_yield(lock) argument [all …]
|
/linux/arch/hexagon/include/asm/ |
A D | spinlock.h | 28 static inline void arch_read_lock(arch_rwlock_t *lock) in arch_read_lock() 43 static inline void arch_read_unlock(arch_rwlock_t *lock) in arch_read_unlock() 58 static inline int arch_read_trylock(arch_rwlock_t *lock) in arch_read_trylock() 76 static inline void arch_write_lock(arch_rwlock_t *lock) in arch_write_lock() 91 static inline int arch_write_trylock(arch_rwlock_t *lock) in arch_write_trylock() 109 static inline void arch_write_unlock(arch_rwlock_t *lock) in arch_write_unlock() 115 static inline void arch_spin_lock(arch_spinlock_t *lock) in arch_spin_lock() 130 static inline void arch_spin_unlock(arch_spinlock_t *lock) in arch_spin_unlock() 136 static inline unsigned int arch_spin_trylock(arch_spinlock_t *lock) in arch_spin_trylock()
|
/linux/tools/virtio/linux/ |
A D | spinlock.h | 8 static inline void spin_lock_init(spinlock_t *lock) in spin_lock_init() 14 static inline void spin_lock(spinlock_t *lock) in spin_lock() 20 static inline void spin_unlock(spinlock_t *lock) in spin_unlock() 26 static inline void spin_lock_bh(spinlock_t *lock) in spin_lock_bh() 31 static inline void spin_unlock_bh(spinlock_t *lock) in spin_unlock_bh() 36 static inline void spin_lock_irq(spinlock_t *lock) in spin_lock_irq() 41 static inline void spin_unlock_irq(spinlock_t *lock) in spin_unlock_irq() 46 static inline void spin_lock_irqsave(spinlock_t *lock, unsigned long f) in spin_lock_irqsave() 51 static inline void spin_unlock_irqrestore(spinlock_t *lock, unsigned long f) in spin_unlock_irqrestore()
|
/linux/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/ |
A D | locks.h | 26 static inline void lock_impl_lock(struct lock_impl *lock) in lock_impl_lock() 31 static inline void lock_impl_unlock(struct lock_impl *lock) in lock_impl_unlock() 47 static inline void lock_impl_init(struct lock_impl *lock) in lock_impl_init() 79 static inline void lock_impl_lock(struct lock_impl *lock) in lock_impl_lock() 131 static inline void spin_lock_init(spinlock_t *lock) in spin_lock_init() 136 static inline void spin_lock(spinlock_t *lock) in spin_lock() 148 static inline void spin_unlock(spinlock_t *lock) in spin_unlock() 157 #define spin_lock_irq(lock) spin_lock(lock) argument 158 #define spin_unlock_irq(lock) spin_unlock(lock) argument 159 #define spin_lock_irqsave(lock, flags) spin_lock(lock) argument [all …]
|
/linux/arch/riscv/include/asm/ |
A D | spinlock.h | 22 static inline void arch_spin_unlock(arch_spinlock_t *lock) in arch_spin_unlock() 27 static inline int arch_spin_trylock(arch_spinlock_t *lock) in arch_spin_trylock() 41 static inline void arch_spin_lock(arch_spinlock_t *lock) in arch_spin_lock() 54 static inline void arch_read_lock(arch_rwlock_t *lock) in arch_read_lock() 69 static inline void arch_write_lock(arch_rwlock_t *lock) in arch_write_lock() 84 static inline int arch_read_trylock(arch_rwlock_t *lock) in arch_read_trylock() 102 static inline int arch_write_trylock(arch_rwlock_t *lock) in arch_write_trylock() 120 static inline void arch_read_unlock(arch_rwlock_t *lock) in arch_read_unlock() 130 static inline void arch_write_unlock(arch_rwlock_t *lock) in arch_write_unlock()
|
/linux/arch/sparc/include/asm/ |
A D | spinlock_32.h | 16 #define arch_spin_is_locked(lock) (*((volatile unsigned char *)(lock)) != 0) argument 18 static inline void arch_spin_lock(arch_spinlock_t *lock) in arch_spin_lock() 38 static inline int arch_spin_trylock(arch_spinlock_t *lock) in arch_spin_trylock() 48 static inline void arch_spin_unlock(arch_spinlock_t *lock) in arch_spin_unlock() 92 #define arch_read_lock(lock) \ argument 112 #define arch_read_unlock(lock) \ argument 133 static inline void arch_write_unlock(arch_rwlock_t *lock) in arch_write_unlock() 177 #define arch_read_trylock(lock) \ argument
|