Home
last modified time | relevance | path

Searched refs:sem (Results 1 – 6 of 6) sorted by relevance

/kernel/locking/
Drwsem.c106 # define DEBUG_RWSEMS_WARN_ON(c, sem) do { \ argument
109 #c, atomic_long_read(&(sem)->count), \
110 (unsigned long) sem->magic, \
111 atomic_long_read(&(sem)->owner), (long)current, \
112 list_empty(&(sem)->wait_list) ? "" : "not ")) \
116 # define DEBUG_RWSEMS_WARN_ON(c, sem) argument
175 static inline void rwsem_set_owner(struct rw_semaphore *sem) in rwsem_set_owner() argument
177 atomic_long_set(&sem->owner, (long)current); in rwsem_set_owner()
180 static inline void rwsem_clear_owner(struct rw_semaphore *sem) in rwsem_clear_owner() argument
182 atomic_long_set(&sem->owner, 0); in rwsem_clear_owner()
[all …]
Dsemaphore.c36 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 …]
Dpercpu-rwsem.c13 int __percpu_init_rwsem(struct percpu_rw_semaphore *sem, in __percpu_init_rwsem() argument
16 sem->read_count = alloc_percpu(int); in __percpu_init_rwsem()
17 if (unlikely(!sem->read_count)) in __percpu_init_rwsem()
21 rcu_sync_init(&sem->rss); in __percpu_init_rwsem()
22 __init_rwsem(&sem->rw_sem, name, rwsem_key); in __percpu_init_rwsem()
23 rcuwait_init(&sem->writer); in __percpu_init_rwsem()
24 sem->readers_block = 0; in __percpu_init_rwsem()
29 void percpu_free_rwsem(struct percpu_rw_semaphore *sem) in percpu_free_rwsem() argument
35 if (!sem->read_count) in percpu_free_rwsem()
38 rcu_sync_dtor(&sem->rss); in percpu_free_rwsem()
[all …]
Drwsem.h7 extern void __down_read(struct rw_semaphore *sem);
8 extern void __up_read(struct rw_semaphore *sem);
/kernel/
Dtaskstats.c58 struct rw_semaphore sem; member
125 down_read(&listeners->sem); in send_cpu_listeners()
140 up_read(&listeners->sem); in send_cpu_listeners()
149 down_write(&listeners->sem); in send_cpu_listeners()
156 up_write(&listeners->sem); in send_cpu_listeners()
306 down_write(&listeners->sem); in add_del_listener()
314 up_write(&listeners->sem); in add_del_listener()
324 down_write(&listeners->sem); in add_del_listener()
332 up_write(&listeners->sem); in add_del_listener()
703 init_rwsem(&(per_cpu(listener_array, i).sem)); in taskstats_init_early()
/kernel/bpf/
Dstackmap.c36 struct rw_semaphore *sem; member
44 up_read_non_owner(work->sem); in do_up_read()
45 work->sem = NULL; in do_up_read()
335 work->sem = &current->mm->mmap_sem; in stack_map_get_build_id_offset()