| /linux/include/linux/ |
| H A D | spinlock_api_up.h | 19 #define assert_raw_spin_locked(lock) do { (void)(lock); } while (0) argument 24 * flags straight, to suppress compiler warnings of unused lock 27 #define ___LOCK_(lock) \ argument 28 do { __acquire(lock); (void)(lock); } while (0) 30 #define ___LOCK_shared(lock) \ argument 31 do { __acquire_shared(lock); (void)(lock); } while (0) 33 #define __LOCK(lock, argument 36 __LOCK_IRQ(lock) global() argument 39 __LOCK_IRQSAVE(lock,flags) global() argument 42 ___UNLOCK(lock) global() argument 45 __UNLOCK(lock) global() argument 48 __UNLOCK_BH(lock) global() argument 52 __UNLOCK_IRQ(lock) global() argument 55 __UNLOCK_IRQRESTORE(lock,flags) global() argument 58 _raw_spin_lock(lock) global() argument 59 _raw_spin_lock_nested(lock,subclass) global() argument 60 _raw_read_lock(lock) global() argument 61 _raw_write_lock(lock) global() argument 62 _raw_write_lock_nested(lock,subclass) global() argument 63 _raw_spin_lock_bh(lock) global() argument 64 _raw_read_lock_bh(lock) global() argument 65 _raw_write_lock_bh(lock) global() argument 66 _raw_spin_lock_irq(lock) global() argument 67 _raw_read_lock_irq(lock) global() argument 68 _raw_write_lock_irq(lock) global() argument 69 _raw_spin_lock_irqsave(lock,flags) global() argument 70 _raw_read_lock_irqsave(lock,flags) global() argument 71 _raw_write_lock_irqsave(lock,flags) global() argument 72 _raw_spin_trylock(lock) global() argument 73 _raw_read_trylock(lock) global() argument 74 _raw_write_trylock(lock) global() argument 75 _raw_spin_trylock_bh(lock) global() argument 76 _raw_spin_unlock(lock) global() argument 77 _raw_read_unlock(lock) global() argument 78 _raw_write_unlock(lock) global() argument 79 _raw_spin_unlock_bh(lock) global() argument 80 _raw_write_unlock_bh(lock) global() argument 81 _raw_read_unlock_bh(lock) global() argument 82 _raw_spin_unlock_irq(lock) global() argument 83 _raw_read_unlock_irq(lock) global() argument 84 _raw_write_unlock_irq(lock) global() argument 85 _raw_spin_unlock_irqrestore(lock,flags) global() argument 87 _raw_read_unlock_irqrestore(lock,flags) global() argument 89 _raw_write_unlock_irqrestore(lock,flags) global() argument [all...] |
| H A D | spinlock.h | 72 #define LOCK_SECTION_NAME ".text..lock."KBUILD_BASENAME 101 extern void __raw_spin_lock_init(raw_spinlock_t *lock, const char *name, 104 # define raw_spin_lock_init(lock) \ argument 108 __raw_spin_lock_init((lock), #lock, &__key, LD_WAIT_SPIN); \ 112 # define raw_spin_lock_init(lock) \ argument 113 do { *(lock) = __RAW_SPIN_LOCK_UNLOCKED(lock); } while (0) 116 #define raw_spin_is_locked(lock) arch_spin_is_locked(&(lock) argument 119 raw_spin_is_contended(lock) global() argument 121 raw_spin_is_contended(lock) global() argument 184 do_raw_spin_lock(raw_spinlock_t * lock) do_raw_spin_lock() argument 191 do_raw_spin_trylock(raw_spinlock_t * lock) do_raw_spin_trylock() argument 201 do_raw_spin_unlock(raw_spinlock_t * lock) do_raw_spin_unlock() argument 215 raw_spin_trylock(lock) global() argument 217 raw_spin_lock(lock) global() argument 220 raw_spin_lock_nested(lock,subclass) global() argument 223 raw_spin_lock_nest_lock(lock,nest_lock) global() argument 234 raw_spin_lock_nested(lock,subclass) global() argument 236 raw_spin_lock_nest_lock(lock,nest_lock) global() argument 241 raw_spin_lock_irqsave(lock,flags) global() argument 248 raw_spin_lock_irqsave_nested(lock,flags,subclass) global() argument 254 raw_spin_lock_irqsave_nested(lock,flags,subclass) global() argument 263 raw_spin_lock_irqsave(lock,flags) global() argument 269 raw_spin_lock_irqsave_nested(lock,flags,subclass) global() argument 274 raw_spin_lock_irq(lock) global() argument 275 raw_spin_lock_bh(lock) global() argument 276 raw_spin_unlock(lock) global() argument 277 raw_spin_unlock_irq(lock) global() argument 279 raw_spin_unlock_irqrestore(lock,flags) global() argument 284 raw_spin_unlock_bh(lock) global() argument 286 raw_spin_trylock_bh(lock) global() argument 289 raw_spin_trylock_irq(lock) global() argument 296 raw_spin_trylock_irqsave(lock,flags) global() argument 324 spinlock_check(spinlock_t * lock) spinlock_check() argument 331 spin_lock_init(lock) global() argument 349 spin_lock(spinlock_t * lock) spin_lock() argument 354 spin_lock_bh(spinlock_t * lock) spin_lock_bh() argument 359 spin_trylock(spinlock_t * lock) spin_trylock() argument 364 spin_lock_nested(lock,subclass) global() argument 369 spin_lock_nest_lock(lock,nest_lock) global() argument 374 spin_lock_irq(spinlock_t * lock) spin_lock_irq() argument 379 spin_lock_irqsave(lock,flags) global() argument 384 spin_lock_irqsave_nested(lock,flags,subclass) global() argument 389 spin_unlock(spinlock_t * lock) spin_unlock() argument 394 spin_unlock_bh(spinlock_t * lock) spin_unlock_bh() argument 399 spin_unlock_irq(spinlock_t * lock) spin_unlock_irq() argument 404 spin_unlock_irqrestore(spinlock_t * lock,unsigned long flags) spin_unlock_irqrestore() argument 409 spin_trylock_bh(spinlock_t * lock) spin_trylock_bh() argument 414 spin_trylock_irq(spinlock_t * lock) spin_trylock_irq() argument 419 spin_trylock_irqsave(lock,flags) global() argument 442 spin_is_locked(spinlock_t * lock) spin_is_locked() argument 447 spin_is_contended(spinlock_t * lock) spin_is_contended() argument 452 assert_spin_locked(lock) global() argument 463 spin_needbreak(spinlock_t * lock) spin_needbreak() argument 479 rwlock_needbreak(rwlock_t * lock) rwlock_needbreak() argument 501 atomic_dec_and_lock(atomic,lock) global() argument 506 atomic_dec_and_lock_irqsave(atomic,lock,flags) global() argument 510 atomic_dec_and_raw_lock(atomic,lock) global() argument 515 atomic_dec_and_raw_lock_irqsave(atomic,lock,flags) global() argument [all...] |
| H A D | spinlock_api_smp.h | 22 void __lockfunc _raw_spin_lock(raw_spinlock_t *lock) __acquires(lock); 23 void __lockfunc _raw_spin_lock_nested(raw_spinlock_t *lock, int subclass) 24 __acquires(lock); 26 _raw_spin_lock_nest_lock(raw_spinlock_t *lock, struct lockdep_map *map) 27 __acquires(lock); 28 void __lockfunc _raw_spin_lock_bh(raw_spinlock_t *lock) __acquires(lock); 29 void __lockfunc _raw_spin_lock_irq(raw_spinlock_t *lock) 30 __acquires(lock); 47 _raw_spin_lock(lock) global() argument 51 _raw_spin_lock_bh(lock) global() argument 55 _raw_spin_lock_irq(lock) global() argument 59 _raw_spin_lock_irqsave(lock) global() argument 63 _raw_spin_trylock(lock) global() argument 67 _raw_spin_trylock_bh(lock) global() argument 71 _raw_spin_unlock(lock) global() argument 75 _raw_spin_unlock_bh(lock) global() argument 79 _raw_spin_unlock_irq(lock) global() argument 83 _raw_spin_unlock_irqrestore(lock,flags) global() argument 86 __raw_spin_trylock(raw_spinlock_t * lock) __raw_spin_trylock() argument 104 __raw_spin_lock_irqsave(raw_spinlock_t * lock) __raw_spin_lock_irqsave() argument 115 __raw_spin_lock_irq(raw_spinlock_t * lock) __raw_spin_lock_irq() argument 123 __raw_spin_lock_bh(raw_spinlock_t * lock) __raw_spin_lock_bh() argument 130 __raw_spin_lock(raw_spinlock_t * lock) __raw_spin_lock() argument 139 __raw_spin_unlock(raw_spinlock_t * lock) __raw_spin_unlock() argument 146 __raw_spin_unlock_irqrestore(raw_spinlock_t * lock,unsigned long flags) __raw_spin_unlock_irqrestore() argument 155 __raw_spin_unlock_irq(raw_spinlock_t * lock) __raw_spin_unlock_irq() argument 163 __raw_spin_unlock_bh(raw_spinlock_t * lock) __raw_spin_unlock_bh() argument 170 __raw_spin_trylock_bh(raw_spinlock_t * lock) __raw_spin_trylock_bh() argument [all...] |
| H A D | spinlock_up.h | 29 static inline void arch_spin_lock(arch_spinlock_t *lock) in arch_spin_lock() argument 31 lock->slock = 0; in arch_spin_lock() 35 static inline int arch_spin_trylock(arch_spinlock_t *lock) in arch_spin_trylock() argument 37 char oldval = lock->slock; in arch_spin_trylock() 39 lock->slock = 0; in arch_spin_trylock() 45 static inline void arch_spin_unlock(arch_spinlock_t *lock) in arch_spin_unlock() argument 48 lock->slock = 1; 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 [all …]
|
| /linux/drivers/md/dm-vdo/ |
| H A D | dedupe.c | 14 * deduplicate against a single block instead of being serialized through a PBN read lock. Only one 22 * A hash_lock acts like a state machine perhaps more than as a lock. Other than the starting and 25 * containing the lock. An asynchronous operation is almost always performed upon entering a state, 28 * In all states except DEDUPING, there is a single data_vio, called the lock agent, performing the 29 * asynchronous operations on behalf of the lock. The agent will change during the lifetime of the 30 * lock if the lock is shared by more than one data_vio. data_vios waiting to deduplicate are kept 31 * on a wait queue. Viewed a different way, the agent holds the lock exclusively until the lock 32 * enters the DEDUPING state, at which point it becomes a shared lock that all the waiters (and any 33 * new data_vios that arrive) use to share a PBN lock. In state DEDUPING, there is no agent. When 34 * the last data_vio in the lock calls back in DEDUPING, it becomes the agent and the lock becomes [all …]
|
| H A D | physical-zone.c | 26 /* Each user data_vio needs a PBN read lock and write lock. */ 54 static inline bool has_lock_type(const struct pbn_lock *lock, enum pbn_lock_type type) in has_lock_type() argument 56 return (lock->implementation == &LOCK_IMPLEMENTATIONS[type]); in has_lock_type() 60 * vdo_is_pbn_read_lock() - Check whether a pbn_lock is a read lock. 61 * @lock: The lock to check. 63 * Return: True if the lock is a read lock. 65 bool vdo_is_pbn_read_lock(const struct pbn_lock *lock) in vdo_is_pbn_read_lock() argument 67 return has_lock_type(lock, VIO_READ_LOCK); in vdo_is_pbn_read_lock() 70 static inline void set_pbn_lock_type(struct pbn_lock *lock, enum pbn_lock_type type) in set_pbn_lock_type() argument 72 lock->implementation = &LOCK_IMPLEMENTATIONS[type]; in set_pbn_lock_type() [all …]
|
| /linux/fs/ocfs2/dlm/ |
| H A D | dlmast.c | 35 struct dlm_lock *lock); 36 static int dlm_should_cancel_bast(struct dlm_ctxt *dlm, struct dlm_lock *lock); 39 * lock level will obsolete a pending bast. 40 * For example, if dlm_thread queued a bast for an EX lock that 42 * lock owner downconverted to NL, the bast is now obsolete. 44 * This is needed because the lock and convert paths can queue 47 static int dlm_should_cancel_bast(struct dlm_ctxt *dlm, struct dlm_lock *lock) in dlm_should_cancel_bast() argument 50 assert_spin_locked(&lock->spinlock); in dlm_should_cancel_bast() 52 if (lock->ml.highest_blocked == LKM_IVMODE) in dlm_should_cancel_bast() 54 BUG_ON(lock->ml.highest_blocked == LKM_NLMODE); in dlm_should_cancel_bast() [all …]
|
| H A D | dlmlock.c | 5 * underlying calls for lock creation 45 struct dlm_lock *lock, int flags); 49 static void dlm_lock_detach_lockres(struct dlm_lock *lock); 66 /* Tell us whether we can grant a new lock request. 71 * returns: 1 if the lock can be granted, 0 otherwise. 74 struct dlm_lock *lock) in dlm_can_grant_new_lock() argument 79 if (!dlm_lock_compatible(tmplock->ml.type, lock->ml.type)) in dlm_can_grant_new_lock() 84 if (!dlm_lock_compatible(tmplock->ml.type, lock->ml.type)) in dlm_can_grant_new_lock() 87 lock->ml.type)) in dlm_can_grant_new_lock() 94 /* performs lock creation at the lockres master site [all …]
|
| H A D | dlmconvert.c | 5 * underlying calls for lock conversion 38 * only one that holds a lock on exit (res->spinlock). 43 struct dlm_lock *lock, int flags, 48 struct dlm_lock *lock, int flags, int type); 61 struct dlm_lock *lock, int flags, int type) in dlmconvert_master() argument 72 status = __dlmconvert_master(dlm, res, lock, flags, type, in dlmconvert_master() 83 dlm_queue_ast(dlm, lock); in dlmconvert_master() 93 /* performs lock conversion at the lockres master site 96 * taken: takes and drops lock->spinlock 99 * call_ast: whether ast should be called for this lock [all …]
|
| H A D | dlmunlock.c | 43 struct dlm_lock *lock, 48 struct dlm_lock *lock, 54 struct dlm_lock *lock, 67 * So to unlock a converting lock, you must first cancel the 76 * taken: res->spinlock and lock->spinlock taken and dropped 79 * all callers should have taken an extra ref on lock coming in 83 struct dlm_lock *lock, in dlmunlock_common() argument 103 /* We want to be sure that we're not freeing a lock in dlmunlock_common() 105 in_use = !list_empty(&lock->ast_list); in dlmunlock_common() 125 spin_lock(&lock->spinlock); in dlmunlock_common() [all …]
|
| /linux/drivers/md/persistent-data/ |
| H A D | dm-block-manager.c | 32 * trace is also emitted for the previous lock acquisition. 45 spinlock_t lock; member 61 static unsigned int __find_holder(struct block_lock *lock, in __find_holder() argument 67 if (lock->holders[i] == task) in __find_holder() 74 /* call this *after* you increment lock->count */ 75 static void __add_holder(struct block_lock *lock, struct task_struct *task) in __add_holder() argument 77 unsigned int h = __find_holder(lock, NULL); in __add_holder() 83 lock->holders[h] = task; in __add_holder() 86 t = lock->traces + h; in __add_holder() 91 /* call this *before* you decrement lock->count */ [all …]
|
| /linux/kernel/locking/ |
| H A D | ww_mutex.h | 9 __ww_waiter_first(struct mutex *lock) in __ww_waiter_first() argument 13 w = list_first_entry(&lock->wait_list, struct mutex_waiter, list); in __ww_waiter_first() 14 if (list_entry_is_head(w, &lock->wait_list, list)) in __ww_waiter_first() 21 __ww_waiter_next(struct mutex *lock, struct mutex_waiter *w) in __ww_waiter_next() argument 24 if (list_entry_is_head(w, &lock->wait_list, list)) in __ww_waiter_next() 31 __ww_waiter_prev(struct mutex *lock, struct mutex_waiter *w) in __ww_waiter_prev() argument 34 if (list_entry_is_head(w, &lock->wait_list, list)) in __ww_waiter_prev() 41 __ww_waiter_last(struct mutex *lock) in __ww_waiter_last() argument 45 w = list_last_entry(&lock->wait_list, struct mutex_waiter, list); in __ww_waiter_last() 46 if (list_entry_is_head(w, &lock->wait_list, list)) in __ww_waiter_last() [all …]
|
| H A D | qspinlock_paravirt.h | 30 * not running. The one lock stealing attempt allowed at slowpath entry 57 * Hybrid PV queued/unfair lock 60 * it will be called once when a lock waiter enter the PV slowpath before 64 * pv_wait_head_or_lock() to signal that it is ready to spin on the lock. 65 * When that bit becomes visible to the incoming waiters, no lock stealing 67 * enter the MCS wait queue. So lock starvation shouldn't happen as long 69 * and hence disabling lock stealing. 71 * When the pending bit isn't set, the lock waiters will stay in the unfair 72 * mode spinning on the lock unless the MCS wait queue is empty. In this 73 * case, the lock waiters will enter the queued mode slowpath trying to [all …]
|
| H A D | qrwlock.c | 15 #include <trace/events/lock.h> 18 * queued_read_lock_slowpath - acquire read lock of a queued rwlock 19 * @lock: Pointer to queued rwlock structure 21 void __lockfunc queued_read_lock_slowpath(struct qrwlock *lock) in queued_read_lock_slowpath() argument 24 * Readers come here when they cannot get the lock without waiting in queued_read_lock_slowpath() 28 * Readers in interrupt context will get the lock immediately in queued_read_lock_slowpath() 29 * if the writer is just waiting (not holding the lock yet), in queued_read_lock_slowpath() 30 * so spin with ACQUIRE semantics until the lock is available in queued_read_lock_slowpath() 33 atomic_cond_read_acquire(&lock->cnts, !(VAL & _QW_LOCKED)); in queued_read_lock_slowpath() 36 atomic_sub(_QR_BIAS, &lock->cnts); in queued_read_lock_slowpath() [all …]
|
| /linux/rust/kernel/sync/ |
| H A D | lock.rs | 3 //! Generic kernel lock and guard. 5 //! It contains a generic Rust lock and guard that allow for different backends (e.g., mutexes, 22 /// The "backend" of a lock. 24 /// It is the actual implementation of the lock, without the need to repeat patterns used in all 29 /// - Implementers must ensure that only one thread/CPU may access the protected data once the lock 30 /// is owned, that is, between calls to [`lock`] and [`unlock`]. 32 /// lock operation. 34 /// [`lock`]: Backend::lock 38 /// The state required by the lock 65 unsafe fn lock(ptr: *mut Self::State) -> Self::GuardState; lock() method 106 pub struct Lock<T: ?Sized, B: Backend> { global() struct 122 dataLock global() argument 123 unsafe impl<T: ?Sized + Send, B: Backend> Send for Lock<T, B> {} global() implementation 127 unsafe impl<T: ?Sized + Send, B: Backend> Sync for Lock<T, B> {} global() implementation 129 impl<T, B: Backend> Lock<T, B> { global() implementation 148 impl<B: Backend> Lock<(), B> { global() implementation 170 impl<T: ?Sized, B: Backend> Lock<T, B> { global() implementation 172 pub fn lock(&self) -> Guard<'_, T, B> { lock() method 199 pub(crate) lock: &'a Lock<T, B>, global() field [all...] |
| /linux/include/asm-generic/ |
| H A D | qrwlock.h | 3 * Queue read/write lock 28 #define _QW_LOCKED 0x0ff /* A writer holds the lock */ 36 extern void queued_read_lock_slowpath(struct qrwlock *lock); 37 extern void queued_write_lock_slowpath(struct qrwlock *lock); 40 * queued_read_trylock - try to acquire read lock of a queued rwlock 41 * @lock : Pointer to queued rwlock structure 42 * Return: 1 if lock acquired, 0 if failed 44 static inline int queued_read_trylock(struct qrwlock *lock) in queued_read_trylock() argument 48 cnts = atomic_read(&lock->cnts); in queued_read_trylock() 50 cnts = (u32)atomic_add_return_acquire(_QR_BIAS, &lock->cnts); in queued_read_trylock() [all …]
|
| /linux/Documentation/locking/ |
| H A D | lockdep-design.rst | 8 Lock-class 15 tens of thousands of) instantiations. For example a lock in the inode 17 lock class. 19 The validator tracks the 'usage state' of lock-classes, and it tracks 20 the dependencies between different lock-classes. Lock usage indicates 21 how a lock is used with regard to its IRQ contexts, while lock 22 dependency can be understood as lock order, where L1 -> L2 suggests that 26 continuing effort to prove lock usages and dependencies are correct or 29 A lock-class's behavior is constructed by its instances collectively: 30 when the first instance of a lock-class is used after bootup the class [all …]
|
| H A D | robust-futex-ABI.rst | 56 pointer to a single linked list of 'lock entries', one per lock, 58 to itself, 'head'. The last 'lock entry' points back to the 'head'. 61 address of the associated 'lock entry', plus or minus, of what will 62 be called the 'lock word', from that 'lock entry'. The 'lock word' 63 is always a 32 bit word, unlike the other words above. The 'lock 65 of the thread holding the lock in the bottom 30 bits. See further 69 the address of the 'lock entry', during list insertion and removal, 73 Each 'lock entry' on the single linked list starting at 'head' consists 74 of just a single word, pointing to the next 'lock entry', or back to 75 'head' if there are no more entries. In addition, nearby to each 'lock [all …]
|
| /linux/arch/powerpc/include/asm/ |
| H A D | simple_spinlock.h | 6 * Simple spin lock operations. 35 static __always_inline int arch_spin_value_unlocked(arch_spinlock_t lock) in arch_spin_value_unlocked() argument 37 return lock.slock == 0; in arch_spin_value_unlocked() 40 static inline int arch_spin_is_locked(arch_spinlock_t *lock) in arch_spin_is_locked() argument 42 return !arch_spin_value_unlocked(READ_ONCE(*lock)); in arch_spin_is_locked() 46 * This returns the old value in the lock, so we succeeded 47 * in getting the lock if the return value is 0. 49 static inline unsigned long __arch_spin_trylock(arch_spinlock_t *lock) in __arch_spin_trylock() argument 64 : "r" (token), "r" (&lock->slock), [eh] "n" (eh) in __arch_spin_trylock() 70 static inline int arch_spin_trylock(arch_spinlock_t *lock) in arch_spin_trylock() argument [all …]
|
| /linux/tools/testing/selftests/bpf/progs/ |
| H A D | linked_list.c | 12 struct bpf_spin_lock lock; member 28 int list_push_pop(struct bpf_spin_lock *lock, struct bpf_list_head *head, bool leave_in_map) in list_push_pop() argument 37 bpf_spin_lock(lock); in list_push_pop() 39 bpf_spin_unlock(lock); in list_push_pop() 46 bpf_spin_lock(lock); in list_push_pop() 48 bpf_spin_unlock(lock); in list_push_pop() 56 bpf_spin_lock(lock); in list_push_pop() 59 bpf_spin_unlock(lock); in list_push_pop() 62 bpf_spin_lock(lock); in list_push_pop() 64 bpf_spin_unlock(lock); in list_push_pop() [all …]
|
| /linux/tools/perf/tests/shell/ |
| H A D | lock_contention.sh | 2 # kernel lock contention analysis test 36 if ! perf list tracepoint | grep -q lock:contention_begin; then 37 echo "[Skip] No lock contention tracepoints" 44 echo "[Skip] Low number of CPUs (`nproc`), lock event cannot be triggered certainly" 52 echo "Testing perf lock record and perf lock contention" 53 perf lock record -o ${perfdata} -- perf bench sched messaging -p > /dev/null 2>&1 55 perf lock contention -i ${perfdata} -E 1 -q 2> ${result} 65 echo "Testing perf lock contention --use-bpf" 67 if ! perf lock con -b true > /dev/null 2>&1 ; then 72 # the perf lock contention output goes to the stderr [all …]
|
| /linux/arch/alpha/include/asm/ |
| H A D | spinlock.h | 11 * Simple spin lock operations. There are two variants, one clears IRQ's 17 #define arch_spin_is_locked(x) ((x)->lock != 0) 19 static inline int arch_spin_value_unlocked(arch_spinlock_t lock) in arch_spin_value_unlocked() argument 21 return lock.lock == 0; in arch_spin_value_unlocked() 24 static inline void arch_spin_unlock(arch_spinlock_t * lock) in arch_spin_unlock() argument 27 lock->lock = 0; in arch_spin_unlock() 30 static inline void arch_spin_lock(arch_spinlock_t * lock) in arch_spin_lock() argument 46 : "=&r" (tmp), "=m" (lock->lock) in arch_spin_lock() 47 : "m"(lock->lock) : "memory"); in arch_spin_lock() 50 static inline int arch_spin_trylock(arch_spinlock_t *lock) in arch_spin_trylock() argument [all …]
|
| /linux/drivers/acpi/acpica/ |
| H A D | utlock.c | 4 * Module Name: utlock - Reader/Writer lock interfaces 21 * PARAMETERS: lock - Pointer to a valid RW lock 25 * DESCRIPTION: Reader/writer lock creation and deletion interfaces. 28 acpi_status acpi_ut_create_rw_lock(struct acpi_rw_lock *lock) in acpi_ut_create_rw_lock() argument 32 lock->num_readers = 0; in acpi_ut_create_rw_lock() 33 status = acpi_os_create_mutex(&lock->reader_mutex); in acpi_ut_create_rw_lock() 38 status = acpi_os_create_mutex(&lock->writer_mutex); in acpi_ut_create_rw_lock() 42 void acpi_ut_delete_rw_lock(struct acpi_rw_lock *lock) in acpi_ut_delete_rw_lock() argument 45 acpi_os_delete_mutex(lock->reader_mutex); in acpi_ut_delete_rw_lock() 46 acpi_os_delete_mutex(lock->writer_mutex); in acpi_ut_delete_rw_lock() [all …]
|
| /linux/arch/hexagon/include/asm/ |
| H A D | spinlock.h | 22 * - load the lock value 24 * - if the lock value is still negative, go back and try again. 26 * - successful store new lock value if positive -> lock acquired 28 static inline void arch_read_lock(arch_rwlock_t *lock) in arch_read_lock() argument 37 : "r" (&lock->lock) in arch_read_lock() 43 static inline void arch_read_unlock(arch_rwlock_t *lock) in arch_read_unlock() argument 51 : "r" (&lock->lock) in arch_read_unlock() 58 static inline int arch_read_trylock(arch_rwlock_t *lock) in arch_read_trylock() argument 69 : "r" (&lock->lock) in arch_read_trylock() 75 /* Stuffs a -1 in the lock value? */ [all …]
|
| /linux/tools/perf/Documentation/ |
| H A D | perf-lock.txt | 1 perf-lock(1) 6 perf-lock - Analyze lock events 11 'perf lock' {record|report|script|info|contention} 15 You can analyze various lock behaviours 16 and statistics with this 'perf lock' command. 18 'perf lock record <command>' records lock events 21 results of lock events. 23 'perf lock report' reports statistical data. 25 'perf lock script' shows raw lock events. 27 'perf lock info' shows metadata like threads or addresses [all …]
|