Searched refs:sem (Results 1 – 4 of 4) sorted by relevance
/kernel/locking/ |
D | rwsem.c | 107 # define DEBUG_RWSEMS_WARN_ON(c, sem) do { \ argument 110 #c, atomic_long_read(&(sem)->count), \ 111 (unsigned long) sem->magic, \ 112 atomic_long_read(&(sem)->owner), (long)current, \ 113 list_empty(&(sem)->wait_list) ? "" : "not ")) \ 117 # define DEBUG_RWSEMS_WARN_ON(c, sem) argument 176 static inline void rwsem_set_owner(struct rw_semaphore *sem) in rwsem_set_owner() argument 178 atomic_long_set(&sem->owner, (long)current); in rwsem_set_owner() 179 trace_android_vh_rwsem_set_owner(sem); in rwsem_set_owner() 182 static inline void rwsem_clear_owner(struct rw_semaphore *sem) in rwsem_clear_owner() argument [all …]
|
D | percpu-rwsem.c | 28 int __percpu_init_rwsem(struct percpu_rw_semaphore *sem, in __percpu_init_rwsem() argument 31 sem->read_count = alloc_percpu(int); in __percpu_init_rwsem() 32 if (unlikely(!sem->read_count)) in __percpu_init_rwsem() 35 rcu_sync_init(&sem->rss); in __percpu_init_rwsem() 36 rcuwait_init(&sem->writer); in __percpu_init_rwsem() 37 init_waitqueue_head(&sem->waiters); in __percpu_init_rwsem() 38 atomic_set(&sem->block, 0); in __percpu_init_rwsem() 40 debug_check_no_locks_freed((void *)sem, sizeof(*sem)); in __percpu_init_rwsem() 41 lockdep_init_map(&sem->dep_map, name, key, 0); in __percpu_init_rwsem() 47 void percpu_free_rwsem(struct percpu_rw_semaphore *sem) in percpu_free_rwsem() argument [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 …]
|
/kernel/ |
D | taskstats.c | 54 struct rw_semaphore sem; member 121 down_read(&listeners->sem); in send_cpu_listeners() 136 up_read(&listeners->sem); in send_cpu_listeners() 145 down_write(&listeners->sem); in send_cpu_listeners() 152 up_write(&listeners->sem); in send_cpu_listeners() 302 down_write(&listeners->sem); in add_del_listener() 310 up_write(&listeners->sem); in add_del_listener() 320 down_write(&listeners->sem); in add_del_listener() 328 up_write(&listeners->sem); in add_del_listener() 677 init_rwsem(&(per_cpu(listener_array, i).sem)); in taskstats_init_early()
|