/kernel/linux/linux-5.10/include/linux/ |
D | spinlock_api_up.h | 19 #define assert_raw_spin_locked(lock) do { (void)(lock); } while (0) argument 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 [all …]
|
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 52 #define _raw_read_lock_bh(lock) __raw_read_lock_bh(lock) argument 56 #define _raw_write_lock_bh(lock) __raw_write_lock_bh(lock) argument 60 #define _raw_read_lock_irq(lock) __raw_read_lock_irq(lock) argument 64 #define _raw_write_lock_irq(lock) __raw_write_lock_irq(lock) argument 68 #define _raw_read_lock_irqsave(lock) __raw_read_lock_irqsave(lock) argument 72 #define _raw_write_lock_irqsave(lock) __raw_write_lock_irqsave(lock) argument 76 #define _raw_read_trylock(lock) __raw_read_trylock(lock) argument 80 #define _raw_write_trylock(lock) __raw_write_trylock(lock) argument [all …]
|
D | spinlock.h | 99 # define raw_spin_lock_init(lock) \ argument 107 # define raw_spin_lock_init(lock) \ argument 111 #define raw_spin_is_locked(lock) arch_spin_is_locked(&(lock)->raw_lock) argument 114 #define raw_spin_is_contended(lock) arch_spin_is_contended(&(lock)->raw_lock) argument 116 #define raw_spin_is_contended(lock) (((void)(lock), 0)) argument 176 #define do_raw_spin_lock_flags(lock, flags) do_raw_spin_lock(lock) argument 180 static inline void do_raw_spin_lock(raw_spinlock_t *lock) __acquires(lock) in do_raw_spin_lock() 188 #define arch_spin_lock_flags(lock, flags) arch_spin_lock(lock) argument 192 do_raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long *flags) __acquires(lock) in do_raw_spin_lock_flags() 199 static inline int do_raw_spin_trylock(raw_spinlock_t *lock) in do_raw_spin_trylock() [all …]
|
D | rwlock.h | 20 # define rwlock_init(lock) \ argument 27 # define rwlock_init(lock) \ argument 33 #define do_raw_read_lock_flags(lock, flags) do_raw_read_lock(lock) argument 37 #define do_raw_write_lock_flags(lock, flags) do_raw_write_lock(lock) argument 43 # define arch_read_lock_flags(lock, flags) arch_read_lock(lock) argument 47 # define arch_write_lock_flags(lock, flags) arch_write_lock(lock) argument 51 # define do_raw_read_lock_flags(lock, flags) \ argument 56 # define do_raw_write_lock_flags(lock, flags) \ argument 67 #define read_trylock(lock) __cond_lock(lock, _raw_read_trylock(lock)) argument 68 #define write_trylock(lock) __cond_lock(lock, _raw_write_trylock(lock)) argument [all …]
|
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 59 #define _raw_spin_lock_irqsave(lock) __raw_spin_lock_irqsave(lock) argument 63 #define _raw_spin_trylock(lock) __raw_spin_trylock(lock) argument 67 #define _raw_spin_trylock_bh(lock) __raw_spin_trylock_bh(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 79 #define _raw_spin_unlock_irq(lock) __raw_spin_unlock_irq(lock) argument 83 #define _raw_spin_unlock_irqrestore(lock, flags) __raw_spin_unlock_irqrestore(lock, flags) argument [all …]
|
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 58 #define arch_read_unlock(lock) do { barrier(); (void)(lock); } while (0) argument 59 #define arch_write_unlock(lock) do { barrier(); (void)(lock); } while (0) argument 62 #define arch_spin_is_locked(lock) ((void)(lock), 0) argument [all …]
|
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
|
/kernel/linux/linux-5.10/kernel/locking/ |
D | spinlock.c | 133 int __lockfunc _raw_spin_trylock(raw_spinlock_t *lock) in _raw_spin_trylock() 141 int __lockfunc _raw_spin_trylock_bh(raw_spinlock_t *lock) in _raw_spin_trylock_bh() 149 void __lockfunc _raw_spin_lock(raw_spinlock_t *lock) in _raw_spin_lock() 157 unsigned long __lockfunc _raw_spin_lock_irqsave(raw_spinlock_t *lock) in _raw_spin_lock_irqsave() 165 void __lockfunc _raw_spin_lock_irq(raw_spinlock_t *lock) in _raw_spin_lock_irq() 173 void __lockfunc _raw_spin_lock_bh(raw_spinlock_t *lock) in _raw_spin_lock_bh() 181 void __lockfunc _raw_spin_unlock(raw_spinlock_t *lock) in _raw_spin_unlock() 189 void __lockfunc _raw_spin_unlock_irqrestore(raw_spinlock_t *lock, unsigned long flags) in _raw_spin_unlock_irqrestore() 197 void __lockfunc _raw_spin_unlock_irq(raw_spinlock_t *lock) in _raw_spin_unlock_irq() 205 void __lockfunc _raw_spin_unlock_bh(raw_spinlock_t *lock) in _raw_spin_unlock_bh() [all …]
|
D | spinlock_debug.c | 16 void __raw_spin_lock_init(raw_spinlock_t *lock, const char *name, in __raw_spin_lock_init() 34 void __rwlock_init(rwlock_t *lock, const char *name, in __rwlock_init() 52 static void spin_dump(raw_spinlock_t *lock, const char *msg) in spin_dump() 70 static void spin_bug(raw_spinlock_t *lock, const char *msg) in spin_bug() 78 #define SPIN_BUG_ON(cond, lock, msg) if (unlikely(cond)) spin_bug(lock, msg) argument 81 debug_spin_lock_before(raw_spinlock_t *lock) in debug_spin_lock_before() 89 static inline void debug_spin_lock_after(raw_spinlock_t *lock) in debug_spin_lock_after() 95 static inline void debug_spin_unlock(raw_spinlock_t *lock) in debug_spin_unlock() 110 void do_raw_spin_lock(raw_spinlock_t *lock) in do_raw_spin_lock() 118 int do_raw_spin_trylock(raw_spinlock_t *lock) in do_raw_spin_trylock() [all …]
|
D | mutex.c | 40 __mutex_init(struct mutex *lock, const char *name, struct lock_class_key *key) in __mutex_init() 73 static inline struct task_struct *__mutex_owner(struct mutex *lock) in __mutex_owner() 83 bool mutex_is_locked(struct mutex *lock) in mutex_is_locked() 90 mutex_trylock_recursive(struct mutex *lock) in mutex_trylock_recursive() 107 static inline struct task_struct *__mutex_trylock_or_owner(struct mutex *lock) in __mutex_trylock_or_owner() 150 static inline bool __mutex_trylock(struct mutex *lock) in __mutex_trylock() 166 static __always_inline bool __mutex_trylock_fast(struct mutex *lock) in __mutex_trylock_fast() 177 static __always_inline bool __mutex_unlock_fast(struct mutex *lock) in __mutex_unlock_fast() 188 static inline void __mutex_set_flag(struct mutex *lock, unsigned long flag) in __mutex_set_flag() 193 static inline void __mutex_clear_flag(struct mutex *lock, unsigned long flag) in __mutex_clear_flag() [all …]
|
D | rtmutex.c | 53 rt_mutex_set_owner(struct rt_mutex *lock, struct task_struct *owner) in rt_mutex_set_owner() 63 static inline void clear_rt_mutex_waiters(struct rt_mutex *lock) in clear_rt_mutex_waiters() 69 static void fixup_rt_mutex_waiters(struct rt_mutex *lock) in fixup_rt_mutex_waiters() 152 static inline void mark_rt_mutex_waiters(struct rt_mutex *lock) in mark_rt_mutex_waiters() 168 static inline bool unlock_rt_mutex_safe(struct rt_mutex *lock, in unlock_rt_mutex_safe() 207 static inline void mark_rt_mutex_waiters(struct rt_mutex *lock) in mark_rt_mutex_waiters() 216 static inline bool unlock_rt_mutex_safe(struct rt_mutex *lock, in unlock_rt_mutex_safe() 271 rt_mutex_enqueue(struct rt_mutex *lock, struct rt_mutex_waiter *waiter) in rt_mutex_enqueue() 294 rt_mutex_dequeue(struct rt_mutex *lock, struct rt_mutex_waiter *waiter) in rt_mutex_dequeue() 457 struct rt_mutex *lock; in rt_mutex_adjust_prio_chain() local [all …]
|
D | mutex-debug.c | 30 void debug_mutex_lock_common(struct mutex *lock, struct mutex_waiter *waiter) in debug_mutex_lock_common() 37 void debug_mutex_wake_waiter(struct mutex *lock, struct mutex_waiter *waiter) in debug_mutex_wake_waiter() 51 void debug_mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter, in debug_mutex_add_waiter() 60 void debug_mutex_remove_waiter(struct mutex *lock, struct mutex_waiter *waiter, in debug_mutex_remove_waiter() 72 void debug_mutex_unlock(struct mutex *lock) in debug_mutex_unlock() 80 void debug_mutex_init(struct mutex *lock, const char *name, in debug_mutex_init() 101 void mutex_destroy(struct mutex *lock) in mutex_destroy()
|
/kernel/liteos_a/kernel/include/ |
D | los_spinlock.h | 60 #define LOCKDEP_CHECK_IN(lock) OsLockDepCheckIn(lock) argument 61 #define LOCKDEP_RECORD(lock) OsLockDepRecord(lock) argument 62 #define LOCKDEP_CHECK_OUT(lock) OsLockDepCheckOut(lock) argument 65 #define LOCKDEP_CHECK_IN(lock) argument 66 #define LOCKDEP_RECORD(lock) argument 67 #define LOCKDEP_CHECK_OUT(lock) argument 221 LITE_OS_SEC_ALW_INLINE STATIC INLINE VOID LOS_SpinLock(SPIN_LOCK_S *lock) in LOS_SpinLock() 226 LITE_OS_SEC_ALW_INLINE STATIC INLINE INT32 LOS_SpinTrylock(SPIN_LOCK_S *lock) in LOS_SpinTrylock() 232 LITE_OS_SEC_ALW_INLINE STATIC INLINE VOID LOS_SpinUnlock(SPIN_LOCK_S *lock) in LOS_SpinUnlock() 237 LITE_OS_SEC_ALW_INLINE STATIC INLINE VOID LOS_SpinLockSave(SPIN_LOCK_S *lock, UINT32 *intSave) in LOS_SpinLockSave() [all …]
|
/kernel/linux/linux-5.10/arch/csky/include/asm/ |
D | spinlock.h | 14 static inline void arch_spin_lock(arch_spinlock_t *lock) in arch_spin_lock() 37 static inline int arch_spin_trylock(arch_spinlock_t *lock) in arch_spin_trylock() 65 static inline void arch_spin_unlock(arch_spinlock_t *lock) in arch_spin_unlock() 71 static inline int arch_spin_value_unlocked(arch_spinlock_t lock) in arch_spin_value_unlocked() 76 static inline int arch_spin_is_locked(arch_spinlock_t *lock) in arch_spin_is_locked() 81 static inline int arch_spin_is_contended(arch_spinlock_t *lock) in arch_spin_is_contended() 99 static inline void arch_spin_lock(arch_spinlock_t *lock) in arch_spin_lock() 116 static inline void arch_spin_unlock(arch_spinlock_t *lock) in arch_spin_unlock() 122 static inline int arch_spin_trylock(arch_spinlock_t *lock) in arch_spin_trylock() 150 static inline void arch_read_lock(arch_rwlock_t *lock) in arch_read_lock() [all …]
|
/kernel/linux/linux-5.10/drivers/gpu/drm/vmwgfx/ |
D | ttm_lock.c | 45 void ttm_lock_init(struct ttm_lock *lock) in ttm_lock_init() 53 void ttm_read_unlock(struct ttm_lock *lock) in ttm_read_unlock() 61 static bool __ttm_read_lock(struct ttm_lock *lock) in __ttm_read_lock() 74 int ttm_read_lock(struct ttm_lock *lock, bool interruptible) in ttm_read_lock() 86 static bool __ttm_read_trylock(struct ttm_lock *lock, bool *locked) in __ttm_read_trylock() 105 int ttm_read_trylock(struct ttm_lock *lock, bool interruptible) in ttm_read_trylock() 124 void ttm_write_unlock(struct ttm_lock *lock) in ttm_write_unlock() 132 static bool __ttm_write_lock(struct ttm_lock *lock) in __ttm_write_lock() 148 int ttm_write_lock(struct ttm_lock *lock, bool interruptible) in ttm_write_lock() 167 void ttm_suspend_unlock(struct ttm_lock *lock) in ttm_suspend_unlock() [all …]
|
/kernel/linux/linux-5.10/arch/powerpc/include/asm/ |
D | simple_spinlock.h | 34 static __always_inline int arch_spin_value_unlocked(arch_spinlock_t lock) in arch_spin_value_unlocked() 39 static inline int arch_spin_is_locked(arch_spinlock_t *lock) in arch_spin_is_locked() 49 static inline unsigned long __arch_spin_trylock(arch_spinlock_t *lock) in __arch_spin_trylock() 69 static inline int arch_spin_trylock(arch_spinlock_t *lock) in arch_spin_trylock() 93 static inline void splpar_spin_yield(arch_spinlock_t *lock) {}; in splpar_spin_yield() 94 static inline void splpar_rw_yield(arch_rwlock_t *lock) {}; in splpar_rw_yield() 97 static inline void spin_yield(arch_spinlock_t *lock) in spin_yield() 105 static inline void rw_yield(arch_rwlock_t *lock) in rw_yield() 113 static inline void arch_spin_lock(arch_spinlock_t *lock) in arch_spin_lock() 128 void arch_spin_lock_flags(arch_spinlock_t *lock, unsigned long flags) in arch_spin_lock_flags() [all …]
|
/kernel/linux/linux-5.10/arch/alpha/include/asm/ |
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()
|
/kernel/linux/linux-5.10/arch/hexagon/include/asm/ |
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()
|
/kernel/linux/linux-5.10/arch/ia64/include/asm/ |
D | spinlock.h | 43 static __always_inline void __ticket_spin_lock(arch_spinlock_t *lock) in __ticket_spin_lock() 63 static __always_inline int __ticket_spin_trylock(arch_spinlock_t *lock) in __ticket_spin_trylock() 72 static __always_inline void __ticket_spin_unlock(arch_spinlock_t *lock) in __ticket_spin_unlock() 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() 96 static __always_inline int arch_spin_value_unlocked(arch_spinlock_t lock) in arch_spin_value_unlocked() 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() [all …]
|
/kernel/linux/linux-5.10/tools/virtio/linux/ |
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()
|
/kernel/linux/linux-5.10/arch/riscv/include/asm/ |
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()
|
/kernel/linux/linux-5.10/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/ |
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() 36 static inline bool lock_impl_trylock(struct lock_impl *lock) in lock_impl_trylock() 47 static inline void lock_impl_init(struct lock_impl *lock) in lock_impl_init() 61 static inline bool lock_impl_trylock(struct lock_impl *lock) in lock_impl_trylock() 79 static inline void lock_impl_lock(struct lock_impl *lock) in lock_impl_lock() 93 static inline void lock_impl_unlock(struct lock_impl *lock) in lock_impl_unlock() 110 static inline void lock_impl_init(struct lock_impl *lock) in lock_impl_init() 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() [all …]
|
/kernel/linux/linux-5.10/arch/sparc/include/asm/ |
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
|
/kernel/liteos_a/kernel/base/mp/ |
D | los_spinlock.c | 37 VOID LOS_SpinInit(SPIN_LOCK_S *lock) in LOS_SpinInit() 45 BOOL LOS_SpinHeld(const SPIN_LOCK_S *lock) in LOS_SpinHeld() 50 VOID LOS_SpinLock(SPIN_LOCK_S *lock) in LOS_SpinLock() 61 INT32 LOS_SpinTrylock(SPIN_LOCK_S *lock) in LOS_SpinTrylock() 84 VOID LOS_SpinUnlock(SPIN_LOCK_S *lock) in LOS_SpinUnlock() 98 VOID LOS_SpinLockSave(SPIN_LOCK_S *lock, UINT32 *intSave) in LOS_SpinLockSave() 108 VOID LOS_SpinUnlockRestore(SPIN_LOCK_S *lock, UINT32 intSave) in LOS_SpinUnlockRestore()
|
/kernel/linux/linux-5.10/drivers/acpi/acpica/ |
D | utlock.c | 28 acpi_status acpi_ut_create_rw_lock(struct acpi_rw_lock *lock) in acpi_ut_create_rw_lock() 42 void acpi_ut_delete_rw_lock(struct acpi_rw_lock *lock) in acpi_ut_delete_rw_lock() 71 acpi_status acpi_ut_acquire_read_lock(struct acpi_rw_lock *lock) in acpi_ut_acquire_read_lock() 93 acpi_status acpi_ut_release_read_lock(struct acpi_rw_lock *lock) in acpi_ut_release_read_lock() 129 acpi_status acpi_ut_acquire_write_lock(struct acpi_rw_lock *lock) in acpi_ut_acquire_write_lock() 137 void acpi_ut_release_write_lock(struct acpi_rw_lock *lock) in acpi_ut_release_write_lock()
|