Searched refs:sem (Results 1 – 5 of 5) sorted by relevance
/kernel/locking/ |
D | rwsem-spinlock.c | 23 int rwsem_is_locked(struct rw_semaphore *sem) in rwsem_is_locked() argument 28 if (raw_spin_trylock_irqsave(&sem->wait_lock, flags)) { in rwsem_is_locked() 29 ret = (sem->count != 0); in rwsem_is_locked() 30 raw_spin_unlock_irqrestore(&sem->wait_lock, flags); in rwsem_is_locked() 39 void __init_rwsem(struct rw_semaphore *sem, const char *name, in __init_rwsem() argument 46 debug_check_no_locks_freed((void *)sem, sizeof(*sem)); in __init_rwsem() 47 lockdep_init_map(&sem->dep_map, name, key, 0); in __init_rwsem() 49 sem->count = 0; in __init_rwsem() 50 raw_spin_lock_init(&sem->wait_lock); in __init_rwsem() 51 INIT_LIST_HEAD(&sem->wait_list); in __init_rwsem() [all …]
|
D | rwsem-xadd.c | 72 void __init_rwsem(struct rw_semaphore *sem, const char *name, in __init_rwsem() argument 79 debug_check_no_locks_freed((void *)sem, sizeof(*sem)); in __init_rwsem() 80 lockdep_init_map(&sem->dep_map, name, key, 0); in __init_rwsem() 82 sem->count = RWSEM_UNLOCKED_VALUE; in __init_rwsem() 83 raw_spin_lock_init(&sem->wait_lock); in __init_rwsem() 84 INIT_LIST_HEAD(&sem->wait_list); in __init_rwsem() 86 sem->owner = NULL; in __init_rwsem() 87 osq_lock_init(&sem->osq); in __init_rwsem() 121 __rwsem_do_wake(struct rw_semaphore *sem, enum rwsem_wake_type wake_type) in __rwsem_do_wake() argument 128 waiter = list_entry(sem->wait_list.next, struct rwsem_waiter, list); in __rwsem_do_wake() [all …]
|
D | semaphore.c | 36 static noinline void __down(struct semaphore *sem); 37 static noinline int __down_interruptible(struct semaphore *sem); 38 static noinline int __down_killable(struct semaphore *sem); 39 static noinline int __down_timeout(struct semaphore *sem, long timeout); 40 static noinline void __up(struct semaphore *sem); 53 void down(struct semaphore *sem) in down() argument 57 raw_spin_lock_irqsave(&sem->lock, flags); in down() 58 if (likely(sem->count > 0)) in down() 59 sem->count--; in down() 61 __down(sem); in down() [all …]
|
D | rwsem.c | 16 static inline void rwsem_set_owner(struct rw_semaphore *sem) in rwsem_set_owner() argument 18 sem->owner = current; in rwsem_set_owner() 21 static inline void rwsem_clear_owner(struct rw_semaphore *sem) in rwsem_clear_owner() argument 23 sem->owner = NULL; in rwsem_clear_owner() 27 static inline void rwsem_set_owner(struct rw_semaphore *sem) in rwsem_set_owner() argument 31 static inline void rwsem_clear_owner(struct rw_semaphore *sem) in rwsem_clear_owner() argument 39 void __sched down_read(struct rw_semaphore *sem) in down_read() argument 42 rwsem_acquire_read(&sem->dep_map, 0, 0, _RET_IP_); in down_read() 44 LOCK_CONTENDED(sem, __down_read_trylock, __down_read); in down_read() 52 int down_read_trylock(struct rw_semaphore *sem) in down_read_trylock() argument [all …]
|
/kernel/ |
D | taskstats.c | 68 struct rw_semaphore sem; member 144 down_read(&listeners->sem); in send_cpu_listeners() 159 up_read(&listeners->sem); in send_cpu_listeners() 168 down_write(&listeners->sem); in send_cpu_listeners() 175 up_write(&listeners->sem); in send_cpu_listeners() 316 down_write(&listeners->sem); in add_del_listener() 324 up_write(&listeners->sem); in add_del_listener() 334 down_write(&listeners->sem); in add_del_listener() 342 up_write(&listeners->sem); in add_del_listener() 698 init_rwsem(&(per_cpu(listener_array, i).sem)); in taskstats_init_early()
|