Home
last modified time | relevance | path

Searched refs:rw_sem (Results 1 – 5 of 5) sorted by relevance

/Linux-v5.4/include/linux/
Dpercpu-rwsem.h15 struct rw_semaphore rw_sem; /* slowpath */ member
25 .rw_sem = __RWSEM_INITIALIZER(name.rw_sem), \
40 rwsem_acquire_read(&sem->rw_sem.dep_map, 0, 0, _RET_IP_); in percpu_down_read()
79 rwsem_acquire_read(&sem->rw_sem.dep_map, 0, 1, _RET_IP_); in percpu_down_read_trylock()
96 rwsem_release(&sem->rw_sem.dep_map, 1, _RET_IP_); in percpu_up_read()
113 #define percpu_rwsem_is_held(sem) lockdep_is_held(&(sem)->rw_sem)
116 lockdep_assert_held(&(sem)->rw_sem)
121 lock_release(&sem->rw_sem.dep_map, 1, ip); in percpu_rwsem_release()
124 atomic_long_set(&sem->rw_sem.owner, RWSEM_OWNER_UNKNOWN); in percpu_rwsem_release()
131 lock_acquire(&sem->rw_sem.dep_map, 0, 1, read, 1, NULL, ip); in percpu_rwsem_acquire()
[all …]
Dfs.h1421 struct percpu_rw_semaphore rw_sem[SB_FREEZE_LEVELS]; member
1589 percpu_rwsem_acquire(&(sb)->s_writers.rw_sem[(lev)-1], 1, _THIS_IP_)
1591 percpu_rwsem_release(&(sb)->s_writers.rw_sem[(lev)-1], 1, _THIS_IP_)
/Linux-v5.4/kernel/locking/
Dpercpu-rwsem.c22 __init_rwsem(&sem->rw_sem, name, rwsem_key); in __percpu_init_rwsem()
88 __down_read(&sem->rw_sem); in __percpu_down_read()
90 __up_read(&sem->rw_sem); in __percpu_down_read()
148 down_write(&sem->rw_sem); in percpu_down_write()
186 up_write(&sem->rw_sem); in percpu_up_write()
/Linux-v5.4/fs/
Dsuper.c164 percpu_free_rwsem(&s->s_writers.rw_sem[i]); in destroy_super_work()
235 if (__percpu_init_rwsem(&s->s_writers.rw_sem[i], in alloc_super()
1638 percpu_up_read(sb->s_writers.rw_sem + level-1); in __sb_end_write()
1665 if (percpu_rwsem_is_held(sb->s_writers.rw_sem + i)) { in __sb_start_write()
1672 percpu_down_read(sb->s_writers.rw_sem + level-1); in __sb_start_write()
1674 ret = percpu_down_read_trylock(sb->s_writers.rw_sem + level-1); in __sb_start_write()
1691 percpu_down_write(sb->s_writers.rw_sem + level-1); in sb_wait_write()
1703 percpu_rwsem_release(sb->s_writers.rw_sem + level, 0, _THIS_IP_); in lockdep_sb_freeze_release()
1714 percpu_rwsem_acquire(sb->s_writers.rw_sem + level, 0, _THIS_IP_); in lockdep_sb_freeze_acquire()
1722 percpu_up_write(sb->s_writers.rw_sem + level); in sb_freeze_unlock()
/Linux-v5.4/kernel/
Dcpu.c334 rwsem_acquire(&cpu_hotplug_lock.rw_sem.dep_map, 0, 0, _THIS_IP_); in lockdep_acquire_cpus_lock()
339 rwsem_release(&cpu_hotplug_lock.rw_sem.dep_map, 1, _THIS_IP_); in lockdep_release_cpus_lock()