/linux-4.19.296/include/linux/ |
D | rwsem.h | 53 extern struct rw_semaphore *rwsem_down_read_failed(struct rw_semaphore *sem); 54 extern struct rw_semaphore *rwsem_down_read_failed_killable(struct rw_semaphore *sem); 55 extern struct rw_semaphore *rwsem_down_write_failed(struct rw_semaphore *sem); 56 extern struct rw_semaphore *rwsem_down_write_failed_killable(struct rw_semaphore *sem); 58 extern struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem); 64 static inline int rwsem_is_locked(struct rw_semaphore *sem) in rwsem_is_locked() argument 66 return atomic_long_read(&sem->count) != 0; in rwsem_is_locked() 96 extern void __init_rwsem(struct rw_semaphore *sem, const char *name, 99 #define init_rwsem(sem) \ argument 103 __init_rwsem((sem), #sem, &__key); \ [all …]
|
D | percpu-rwsem.h | 32 static inline void percpu_down_read_preempt_disable(struct percpu_rw_semaphore *sem) in percpu_down_read_preempt_disable() argument 36 rwsem_acquire_read(&sem->rw_sem.dep_map, 0, 0, _RET_IP_); in percpu_down_read_preempt_disable() 47 __this_cpu_inc(*sem->read_count); in percpu_down_read_preempt_disable() 48 if (unlikely(!rcu_sync_is_idle(&sem->rss))) in percpu_down_read_preempt_disable() 49 __percpu_down_read(sem, false); /* Unconditional memory barrier */ in percpu_down_read_preempt_disable() 57 static inline void percpu_down_read(struct percpu_rw_semaphore *sem) in percpu_down_read() argument 59 percpu_down_read_preempt_disable(sem); in percpu_down_read() 63 static inline int percpu_down_read_trylock(struct percpu_rw_semaphore *sem) in percpu_down_read_trylock() argument 71 __this_cpu_inc(*sem->read_count); in percpu_down_read_trylock() 72 if (unlikely(!rcu_sync_is_idle(&sem->rss))) in percpu_down_read_trylock() [all …]
|
D | tty_ldisc.h | 138 extern void __init_ldsem(struct ld_semaphore *sem, const char *name, 141 #define init_ldsem(sem) \ argument 145 __init_ldsem((sem), #sem, &__key); \ 149 extern int ldsem_down_read(struct ld_semaphore *sem, long timeout); 150 extern int ldsem_down_read_trylock(struct ld_semaphore *sem); 151 extern int ldsem_down_write(struct ld_semaphore *sem, long timeout); 152 extern int ldsem_down_write_trylock(struct ld_semaphore *sem); 153 extern void ldsem_up_read(struct ld_semaphore *sem); 154 extern void ldsem_up_write(struct ld_semaphore *sem); 157 extern int ldsem_down_read_nested(struct ld_semaphore *sem, int subclass, [all …]
|
D | rwsem-spinlock.h | 35 extern void __down_read(struct rw_semaphore *sem); 36 extern int __must_check __down_read_killable(struct rw_semaphore *sem); 37 extern int __down_read_trylock(struct rw_semaphore *sem); 38 extern void __down_write(struct rw_semaphore *sem); 39 extern int __must_check __down_write_killable(struct rw_semaphore *sem); 40 extern int __down_write_trylock(struct rw_semaphore *sem); 41 extern void __up_read(struct rw_semaphore *sem); 42 extern void __up_write(struct rw_semaphore *sem); 43 extern void __downgrade_write(struct rw_semaphore *sem); 44 extern int rwsem_is_locked(struct rw_semaphore *sem);
|
D | semaphore.h | 32 static inline void sema_init(struct semaphore *sem, int val) in sema_init() argument 35 *sem = (struct semaphore) __SEMAPHORE_INITIALIZER(*sem, val); in sema_init() 36 lockdep_init_map(&sem->lock.dep_map, "semaphore->lock", &__key, 0); in sema_init() 39 extern void down(struct semaphore *sem); 40 extern int __must_check down_interruptible(struct semaphore *sem); 41 extern int __must_check down_killable(struct semaphore *sem); 42 extern int __must_check down_trylock(struct semaphore *sem); 43 extern int __must_check down_timeout(struct semaphore *sem, long jiffies); 44 extern void up(struct semaphore *sem);
|
D | key.h | 162 struct rw_semaphore sem; /* change vs change sem */ member 389 rwsem_is_locked(&((struct key *)(KEY))->sem)))
|
/linux-4.19.296/include/asm-generic/ |
D | rwsem.h | 35 static inline void __down_read(struct rw_semaphore *sem) in __down_read() argument 37 if (unlikely(atomic_long_inc_return_acquire(&sem->count) <= 0)) in __down_read() 38 rwsem_down_read_failed(sem); in __down_read() 41 static inline int __down_read_killable(struct rw_semaphore *sem) in __down_read_killable() argument 43 if (unlikely(atomic_long_inc_return_acquire(&sem->count) <= 0)) { in __down_read_killable() 44 if (IS_ERR(rwsem_down_read_failed_killable(sem))) in __down_read_killable() 51 static inline int __down_read_trylock(struct rw_semaphore *sem) in __down_read_trylock() argument 55 while ((tmp = atomic_long_read(&sem->count)) >= 0) { in __down_read_trylock() 56 if (tmp == atomic_long_cmpxchg_acquire(&sem->count, tmp, in __down_read_trylock() 67 static inline void __down_write(struct rw_semaphore *sem) in __down_write() argument [all …]
|
/linux-4.19.296/drivers/i2c/busses/ |
D | i2c-designware-baytrail.c | 33 static int get_sem(struct dw_i2c_dev *dev, u32 *sem) in get_sem() argument 45 *sem = data & PUNIT_SEMAPHORE_BIT; in get_sem() 66 u32 sem = PUNIT_SEMAPHORE_ACQUIRE; in baytrail_i2c_acquire() local 92 ret = iosf_mbi_write(BT_MBI_UNIT_PMC, MBI_REG_WRITE, addr, sem); in baytrail_i2c_acquire() 102 ret = get_sem(dev, &sem); in baytrail_i2c_acquire() 103 if (!ret && sem) { in baytrail_i2c_acquire() 117 ret = iosf_mbi_read(BT_MBI_UNIT_PMC, MBI_REG_READ, addr, &sem); in baytrail_i2c_acquire() 121 dev_err(dev->dev, "PUNIT SEM: %d\n", sem); in baytrail_i2c_acquire()
|
/linux-4.19.296/fs/jffs2/ |
D | dir.c | 94 mutex_lock(&dir_f->sem); in jffs2_lookup() 107 mutex_unlock(&dir_f->sem); in jffs2_lookup() 132 mutex_lock(&f->sem); in jffs2_readdir() 153 mutex_unlock(&f->sem); in jffs2_readdir() 198 mutex_unlock(&f->sem); in jffs2_create() 267 mutex_lock(&f->sem); in jffs2_link() 269 mutex_unlock(&f->sem); in jffs2_link() 343 mutex_unlock(&f->sem); in jffs2_symlink() 353 mutex_unlock(&f->sem); in jffs2_symlink() 367 mutex_unlock(&f->sem); in jffs2_symlink() [all …]
|
D | write.c | 145 mutex_unlock(&f->sem); in jffs2_write_dnode() 150 mutex_lock(&f->sem); in jffs2_write_dnode() 297 mutex_unlock(&f->sem); in jffs2_write_dirent() 302 mutex_lock(&f->sem); in jffs2_write_dirent() 368 mutex_lock(&f->sem); in jffs2_write_inode_range() 397 mutex_unlock(&f->sem); in jffs2_write_inode_range() 420 mutex_unlock(&f->sem); in jffs2_write_inode_range() 424 mutex_unlock(&f->sem); in jffs2_write_inode_range() 460 mutex_lock(&f->sem); in jffs2_do_create() 473 mutex_unlock(&f->sem); in jffs2_do_create() [all …]
|
D | file.c | 125 mutex_lock(&f->sem); in jffs2_readpage() 127 mutex_unlock(&f->sem); in jffs2_readpage() 158 mutex_lock(&f->sem); in jffs2_write_begin() 185 mutex_unlock(&f->sem); in jffs2_write_begin() 200 mutex_unlock(&f->sem); in jffs2_write_begin() 205 mutex_unlock(&f->sem); in jffs2_write_begin() 227 mutex_lock(&f->sem); in jffs2_write_begin() 229 mutex_unlock(&f->sem); in jffs2_write_begin()
|
D | fs.c | 59 mutex_lock(&f->sem); in jffs2_do_setattr() 63 mutex_unlock(&f->sem); in jffs2_do_setattr() 68 mutex_unlock(&f->sem); in jffs2_do_setattr() 72 mutex_unlock(&f->sem); in jffs2_do_setattr() 92 mutex_lock(&f->sem); in jffs2_do_setattr() 145 mutex_unlock(&f->sem); in jffs2_do_setattr() 176 mutex_unlock(&f->sem); in jffs2_do_setattr() 273 mutex_lock(&f->sem); in jffs2_iget() 355 mutex_unlock(&f->sem); in jffs2_iget() 364 mutex_unlock(&f->sem); in jffs2_iget() [all …]
|
D | README.Locking | 37 Ordering constraints: See f->sem. 40 File Mutex f->sem 65 any f->sem held. 68 3. Never lock a page cache page with f->sem held. 86 the list are protected by the file mutex f->sem. But the erase code 111 Note, the f->sem guarantees that the correspondent jffs2_inode_cache 148 Lock wbuf_sem last, after the alloc_sem or and f->sem.
|
D | jffs2_fs_i.h | 27 struct mutex sem; member
|
D | debug.c | 69 mutex_lock(&f->sem); in __jffs2_dbg_fragtree_paranoia_check() 71 mutex_unlock(&f->sem); in __jffs2_dbg_fragtree_paranoia_check() 697 mutex_lock(&f->sem); in __jffs2_dbg_dump_fragtree() 699 mutex_unlock(&f->sem); in __jffs2_dbg_dump_fragtree()
|
/linux-4.19.296/drivers/char/xilinx_hwicap/ |
D | xilinx_hwicap.c | 365 status = mutex_lock_interruptible(&drvdata->sem); in hwicap_read() 436 mutex_unlock(&drvdata->sem); in hwicap_read() 451 status = mutex_lock_interruptible(&drvdata->sem); in hwicap_write() 525 mutex_unlock(&drvdata->sem); in hwicap_write() 537 status = mutex_lock_interruptible(&drvdata->sem); in hwicap_open() 558 mutex_unlock(&drvdata->sem); in hwicap_open() 570 mutex_lock(&drvdata->sem); in hwicap_release() 589 mutex_unlock(&drvdata->sem); in hwicap_release() 674 mutex_init(&drvdata->sem); in hwicap_setup()
|
D | xilinx_hwicap.h | 60 struct mutex sem; member
|
/linux-4.19.296/include/soc/arc/ |
D | mcip.h | 67 msg:1, sem:1, ipi:1, slv:1, member 71 slv:1, ipi:1, sem:1, msg:1,
|
/linux-4.19.296/drivers/misc/cxl/ |
D | flash.c | 27 static struct semaphore sem; variable 402 if (down_interruptible(&sem) != 0) in device_open() 453 up(&sem); in device_open() 497 up(&sem); in device_close() 540 sema_init(&sem, 1); in cxl_guest_add_chardev()
|
/linux-4.19.296/include/uapi/linux/ |
D | sem.h | 29 struct sem *sem_base; /* ptr to first semaphore in array */
|
/linux-4.19.296/fs/crypto/ |
D | keyinfo.c | 94 down_read(&key->sem); in find_and_lock_process_key() 121 up_read(&key->sem); in find_and_lock_process_key() 146 up_read(&key->sem); in find_and_derive_key()
|
/linux-4.19.296/lib/ |
D | digsig.c | 87 down_read(&key->sem); in digsig_verify_rsa() 182 up_read(&key->sem); in digsig_verify_rsa()
|
/linux-4.19.296/fs/ecryptfs/ |
D | keystore.c | 527 down_write(&(walker->global_auth_tok_key->sem)); in ecryptfs_find_global_auth_tok_for_sig() 540 up_write(&(walker->global_auth_tok_key->sem)); in ecryptfs_find_global_auth_tok_for_sig() 861 up_write(&(auth_tok_key->sem)); in ecryptfs_write_tag_70_packet() 1102 up_write(&(auth_tok_key->sem)); in ecryptfs_parse_tag_70_packet() 1639 down_write(&(*auth_tok_key)->sem); in ecryptfs_keyring_auth_tok_for_sig() 1642 up_write(&(*auth_tok_key)->sem); in ecryptfs_keyring_auth_tok_for_sig() 1915 up_write(&(auth_tok_key->sem)); in ecryptfs_parse_packet_set() 1923 up_write(&(auth_tok_key->sem)); in ecryptfs_parse_packet_set() 1928 up_write(&(auth_tok_key->sem)); in ecryptfs_parse_packet_set() 1990 up_write(&(auth_tok_key->sem)); in pki_encrypt_session_key() [all …]
|
/linux-4.19.296/drivers/cpufreq/ |
D | brcmstb-avs-cpufreq.c | 179 struct semaphore sem; member 207 ret = down_interruptible(&priv->sem); in __issue_avs_command() 288 up(&priv->sem); in __issue_avs_command() 524 sema_init(&priv->sem, 1); in brcm_avs_prepare_init()
|
/linux-4.19.296/drivers/media/dvb-core/ |
D | dvb_frontend.c | 109 struct semaphore sem; member 286 up(&fepriv->sem); in dvb_frontend_test_event() 288 down(&fepriv->sem); in dvb_frontend_test_event() 688 up(&fepriv->sem); /* is locked when we enter the thread... */ in dvb_frontend_thread() 698 if (!down_interruptible(&fepriv->sem)) in dvb_frontend_thread() 707 if (down_interruptible(&fepriv->sem)) in dvb_frontend_thread() 816 up(&fepriv->sem); in dvb_frontend_thread() 836 sema_init(&fepriv->sem, 1); in dvb_frontend_stop() 885 if (down_interruptible(&fepriv->sem)) in dvb_frontend_start() 900 up(&fepriv->sem); in dvb_frontend_start() [all …]
|