Home
last modified time | relevance | path

Searched refs:locks (Results 1 – 25 of 216) sorted by relevance

123456789

/Linux-v4.19/kernel/locking/
Dtest-ww_mutex.c357 struct ww_mutex *locks; member
395 struct ww_mutex *locks = stress->locks; in stress_inorder_work() local
414 err = ww_mutex_lock(&locks[order[n]], &ctx); in stress_inorder_work()
422 ww_mutex_unlock(&locks[order[contended]]); in stress_inorder_work()
425 ww_mutex_unlock(&locks[order[n]]); in stress_inorder_work()
428 ww_mutex_lock_slow(&locks[order[contended]], &ctx); in stress_inorder_work()
453 LIST_HEAD(locks); in stress_reorder_work()
468 ll->lock = &stress->locks[order[n]]; in stress_reorder_work()
469 list_add(&ll->link, &locks); in stress_reorder_work()
477 list_for_each_entry(ll, &locks, link) { in stress_reorder_work()
[all …]
/Linux-v4.19/lib/
Dbucket_locks.c14 int __alloc_bucket_spinlocks(spinlock_t **locks, unsigned int *locks_mask, in __alloc_bucket_spinlocks() argument
43 *locks = tlocks; in __alloc_bucket_spinlocks()
50 void free_bucket_spinlocks(spinlock_t *locks) in free_bucket_spinlocks() argument
52 kvfree(locks); in free_bucket_spinlocks()
/Linux-v4.19/Documentation/filesystems/
Ddirectory-locking2 kinds of locks - per-inode (->i_rwsem) and per-filesystem
6 always acquire the locks in order by increasing address. We'll call
11 1) read access. Locking rules: caller locks directory we are accessing.
17 3) object removal. Locking rules: caller locks parent, finds victim,
18 locks victim and calls the method. Locks are exclusive.
20 4) rename() that is _not_ cross-directory. Locking rules: caller locks
25 Then call the method. All locks are exclusive.
34 All locks are exclusive.
70 change until rename acquires all locks. (Proof: other cross-directory
72 the order until we had acquired all locks).
[all …]
Dmandatory-locking.txt32 processes. File locks are applied using the flock() and fcntl() system calls
34 normally a process' responsibility to check for locks on a file it wishes to
54 interface for applying locks just as if they were normal, advisory locks.
90 another process has outstanding mandatory locks. This is in direct
96 HP-UX even disallows open() with O_TRUNC for a file with advisory locks, not
97 just mandatory locks. That would appear to contravene POSIX.1.
100 prevent mandatory locks from being applied to an mmap()'ed file, but HP-UX
101 also disallows advisory locks for such a file. SVID actually specifies the
105 only from mandatory locks - that is what is currently implemented.
108 mandatory locks, so reads and writes to locked files always block when they
[all …]
/Linux-v4.19/include/linux/
Dblockgroup_lock.h24 struct bgl_lock locks[NR_BG_LOCKS]; member
32 spin_lock_init(&bgl->locks[i].lock); in bgl_lock_init()
38 return &bgl->locks[block_group & (NR_BG_LOCKS-1)].lock; in bgl_lock_ptr()
Dspinlock.h454 int __alloc_bucket_spinlocks(spinlock_t **locks, unsigned int *lock_mask,
459 #define alloc_bucket_spinlocks(locks, lock_mask, max_size, cpu_mult, gfp) \ argument
464 ret = __alloc_bucket_spinlocks(locks, lock_mask, max_size, \
465 cpu_mult, gfp, #locks, &key); \
469 void free_bucket_spinlocks(spinlock_t *locks);
/Linux-v4.19/tools/memory-model/
Dlinux-kernel.bell37 unmatched-locks = Rcu-lock \ domain(matched)
39 and unmatched = unmatched-locks | unmatched-unlocks
41 and unmatched-locks-to-unlocks =
42 [unmatched-locks] ; po ; [unmatched-unlocks]
43 and matched = matched | (unmatched-locks-to-unlocks \
/Linux-v4.19/drivers/net/wireless/realtek/rtlwifi/
Dps.c102 spin_lock(&rtlpriv->locks.rf_ps_lock); in rtl_ps_set_rf_state()
104 spin_unlock(&rtlpriv->locks.rf_ps_lock); in rtl_ps_set_rf_state()
122 spin_unlock(&rtlpriv->locks.rf_ps_lock); in rtl_ps_set_rf_state()
168 spin_lock(&rtlpriv->locks.rf_ps_lock); in rtl_ps_set_rf_state()
170 spin_unlock(&rtlpriv->locks.rf_ps_lock); in rtl_ps_set_rf_state()
297 mutex_lock(&rtlpriv->locks.ips_mutex); in rtl_ips_nic_on()
314 mutex_unlock(&rtlpriv->locks.ips_mutex); in rtl_ips_nic_on()
443 mutex_lock(&rtlpriv->locks.lps_mutex); in rtl_lps_enter_core()
453 mutex_unlock(&rtlpriv->locks.lps_mutex); in rtl_lps_enter_core()
463 mutex_lock(&rtlpriv->locks.lps_mutex); in rtl_lps_leave_core()
[all …]
Dcore.c159 mutex_lock(&rtlpriv->locks.conf_mutex); in rtl_op_start()
163 mutex_unlock(&rtlpriv->locks.conf_mutex); in rtl_op_start()
187 mutex_lock(&rtlpriv->locks.conf_mutex); in rtl_op_stop()
202 mutex_unlock(&rtlpriv->locks.conf_mutex); in rtl_op_stop()
247 mutex_lock(&rtlpriv->locks.conf_mutex); in rtl_op_add_interface()
334 mutex_unlock(&rtlpriv->locks.conf_mutex); in rtl_op_add_interface()
344 mutex_lock(&rtlpriv->locks.conf_mutex); in rtl_op_remove_interface()
369 mutex_unlock(&rtlpriv->locks.conf_mutex); in rtl_op_remove_interface()
608 mutex_lock(&rtlpriv->locks.conf_mutex); in rtl_op_config()
809 mutex_unlock(&rtlpriv->locks.conf_mutex); in rtl_op_config()
[all …]
/Linux-v4.19/drivers/staging/rtlwifi/
Dps.c90 spin_lock(&rtlpriv->locks.rf_ps_lock); in rtl_ps_set_rf_state()
92 spin_unlock(&rtlpriv->locks.rf_ps_lock); in rtl_ps_set_rf_state()
110 spin_unlock(&rtlpriv->locks.rf_ps_lock); in rtl_ps_set_rf_state()
150 spin_lock(&rtlpriv->locks.rf_ps_lock); in rtl_ps_set_rf_state()
152 spin_unlock(&rtlpriv->locks.rf_ps_lock); in rtl_ps_set_rf_state()
279 mutex_lock(&rtlpriv->locks.ips_mutex); in rtl_ips_nic_on()
297 mutex_unlock(&rtlpriv->locks.ips_mutex); in rtl_ips_nic_on()
425 mutex_lock(&rtlpriv->locks.lps_mutex); in rtl_lps_enter_core()
435 mutex_unlock(&rtlpriv->locks.lps_mutex); in rtl_lps_enter_core()
445 mutex_lock(&rtlpriv->locks.lps_mutex); in rtl_lps_leave_core()
[all …]
Dcore.c105 mutex_lock(&rtlpriv->locks.conf_mutex); in rtl_op_start()
109 mutex_unlock(&rtlpriv->locks.conf_mutex); in rtl_op_start()
133 mutex_lock(&rtlpriv->locks.conf_mutex); in rtl_op_stop()
148 mutex_unlock(&rtlpriv->locks.conf_mutex); in rtl_op_stop()
194 mutex_lock(&rtlpriv->locks.conf_mutex); in rtl_op_add_interface()
281 mutex_unlock(&rtlpriv->locks.conf_mutex); in rtl_op_add_interface()
291 mutex_lock(&rtlpriv->locks.conf_mutex); in rtl_op_remove_interface()
316 mutex_unlock(&rtlpriv->locks.conf_mutex); in rtl_op_remove_interface()
555 mutex_lock(&rtlpriv->locks.conf_mutex); in rtl_op_config()
757 mutex_unlock(&rtlpriv->locks.conf_mutex); in rtl_op_config()
[all …]
/Linux-v4.19/Documentation/
Drobust-futex-ABI.txt9 futexes, for kernel assist of cleanup of held locks on task exit.
12 linked list in user space, where it can be updated efficiently as locks
19 2) internal kernel code at exit, to handle any listed locks held
32 to do so, then improperly listed locks will not be cleaned up on exit,
34 waiting on the same locks.
88 specified 'offset'. Should a thread die while holding any such locks,
89 the kernel will walk this list, mark any such locks with a bit
106 robust_futexes used by that thread. The thread should link those locks
108 other links between the locks, such as the reverse side of a double
111 By keeping its locks linked this way, on a list starting with a 'head'
[all …]
Dpi-futex.txt32 Firstly, sharing locks between multiple tasks is a common programming
46 short-held locks: for example, a highprio audio playback thread is
51 So once we accept that synchronization objects (locks) are an
53 apps have a very fair expectation of being able to use locks, we've got
58 inheritance only apply to kernel-space locks. But user-space locks are
64 locks (such as futex-based pthread mutexes) is priority inheritance:
80 normal futex-based locks: a 0 value means unlocked, and a value==TID
/Linux-v4.19/arch/x86/kernel/
Dmodule.c230 const Elf_Shdr *s, *text = NULL, *alt = NULL, *locks = NULL, in module_finalize() local
240 locks = s; in module_finalize()
254 if (locks && text) { in module_finalize()
255 void *lseg = (void *)locks->sh_addr; in module_finalize()
258 lseg, lseg + locks->sh_size, in module_finalize()
Dalternative.c470 const s32 *locks; member
484 void *locks, void *locks_end, in alternatives_smp_module_add() argument
504 smp->locks = locks; in alternatives_smp_module_add()
509 smp->locks, smp->locks_end, in alternatives_smp_module_add()
514 alternatives_smp_unlock(locks, locks_end, text, text_end); in alternatives_smp_module_add()
549 alternatives_smp_lock(mod->locks, mod->locks_end, in alternatives_enable_smp()
572 for (poff = mod->locks; poff < mod->locks_end; poff++) { in alternatives_text_reserved()
/Linux-v4.19/drivers/net/wireless/realtek/rtlwifi/rtl8192de/
Dfw.c317 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); in _rtl92d_fill_h2c_command()
324 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, in _rtl92d_fill_h2c_command()
335 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, in _rtl92d_fill_h2c_command()
338 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in _rtl92d_fill_h2c_command()
341 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in _rtl92d_fill_h2c_command()
459 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); in _rtl92d_fill_h2c_command()
461 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in _rtl92d_fill_h2c_command()
490 spin_lock_irqsave(&rtlpriv->locks.irq_th_lock, flags); in _rtl92d_cmd_send_packet()
496 spin_unlock_irqrestore(&rtlpriv->locks.irq_th_lock, flags); in _rtl92d_cmd_send_packet()
/Linux-v4.19/Documentation/locking/
Dmutex-design.txt12 or similar theoretical text books. Mutexes are sleeping locks which
24 and implemented in kernel/locking/mutex.c. These locks use an atomic variable
66 While formally kernel mutexes are sleepable locks, it is path (ii) that
83 - Memory areas where held locks reside must not be freed.
95 list of all locks held in the system, printout of them.
97 - Detects self-recursing locks and prints out all relevant info.
99 locks and tasks (and only those tasks).
133 locks in the kernel. E.g: on x86-64 it is 32 bytes, where 'struct semaphore'
Dlockdep-design.txt10 The basic object the validator operates upon is a 'class' of locks.
12 A class of locks is a group of locks that are logically the same with
13 respect to locking rules, even if the locks may have multiple (possibly
84 Furthermore, two locks may not be taken in different order:
92 validator will still track all dependencies between locks.)
108 any rule violation between the new lock and any of the held locks.
126 could interrupt _any_ of the irq-unsafe or hardirq-unsafe locks, which
138 locks in this fixed order on each of the objects.
175 Two constructs can be used to annotate and check where and if certain locks
264 sequence of locks taken after each other) only once. A simple stack of
[all …]
Dspinlocks.txt1 Lesson 1: Spin locks
48 to mostly read from the shared variables, the reader-writer locks
53 NOTE! reader-writer locks require more atomic memory operations than
133 Note that you can be clever with read-write locks and interrupts. For
135 you can use a non-irq version of read locks everywhere - because they
139 For an example of being clever with rw-locks, see the "waitqueue_lock"
142 wake up. So read-locks are safe (which is good: they are very common
143 indeed), while write-locks need to protect themselves against interrupts.
/Linux-v4.19/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/
Dfw.c71 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); in _rtl8723e_fill_h2c_command()
78 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, in _rtl8723e_fill_h2c_command()
88 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, in _rtl8723e_fill_h2c_command()
91 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in _rtl8723e_fill_h2c_command()
94 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in _rtl8723e_fill_h2c_command()
247 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); in _rtl8723e_fill_h2c_command()
249 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in _rtl8723e_fill_h2c_command()
/Linux-v4.19/drivers/staging/rtlwifi/rtl8822be/
Dfw.c56 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); in _rtl8822be_fill_h2c_command()
63 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, in _rtl8822be_fill_h2c_command()
73 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, in _rtl8822be_fill_h2c_command()
76 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in _rtl8822be_fill_h2c_command()
79 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in _rtl8822be_fill_h2c_command()
212 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); in _rtl8822be_fill_h2c_command()
214 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in _rtl8822be_fill_h2c_command()
395 spin_lock_irqsave(&rtlpriv->locks.irq_th_lock, flags); in _rtl8822be_send_bcn_or_cmd_packet()
423 spin_unlock_irqrestore(&rtlpriv->locks.irq_th_lock, in _rtl8822be_send_bcn_or_cmd_packet()
441 spin_unlock_irqrestore(&rtlpriv->locks.irq_th_lock, flags); in _rtl8822be_send_bcn_or_cmd_packet()
/Linux-v4.19/Documentation/gpu/
Dvgaarbiter.rst39 Close a user instance. Release locks made by the user
44 "<card_ID>,decodes=<io_state>,owns=<io_state>,locks=<io_state> (ic,mc)"
50 "locks" indicates what is locked by this card. If the card is
61 acquires locks on target ("none" is an invalid io_state)
63 non-blocking acquire locks on target (returns EBUSY if
66 release locks on target
68 release all locks on target held by this user (not implemented
81 Note about locks:
83 The driver keeps track of which user has which locks on which card. It
87 Currently, a max of 16 cards can have locks simultaneously issued from
/Linux-v4.19/drivers/net/wireless/realtek/rtlwifi/rtl8723be/
Dfw.c69 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); in _rtl8723be_fill_h2c_command()
76 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, in _rtl8723be_fill_h2c_command()
86 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, in _rtl8723be_fill_h2c_command()
89 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in _rtl8723be_fill_h2c_command()
92 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in _rtl8723be_fill_h2c_command()
212 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); in _rtl8723be_fill_h2c_command()
214 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in _rtl8723be_fill_h2c_command()
/Linux-v4.19/fs/cifs/
Dsmb2file.c139 list_for_each_entry_safe(li, tmp, &cfile->llist->locks, llist) { in smb2_unlock_range()
176 &cfile->llist->locks); in smb2_unlock_range()
194 cifs_move_llist(&tmp_llist, &cfile->llist->locks); in smb2_unlock_range()
216 list_for_each_entry(li, &fdlocks->locks, llist) { in smb2_push_mand_fdlocks()
/Linux-v4.19/Documentation/filesystems/nfs/
Dfault_injection.txt17 work over NFS (open files, take locks, ...).
23 process the first n items it finds. So if you want to forget 5 locks, echo '5'
46 Clearing this list will force the client to reclaim its locks (files are
69 forgetall locks.

123456789