Lines Matching refs:sem

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); \
112 static inline int rwsem_is_contended(struct rw_semaphore *sem) in rwsem_is_contended() argument
114 return !list_empty(&sem->wait_list); in rwsem_is_contended()
120 extern void down_read(struct rw_semaphore *sem);
121 extern int __must_check down_read_killable(struct rw_semaphore *sem);
126 extern int down_read_trylock(struct rw_semaphore *sem);
131 extern void down_write(struct rw_semaphore *sem);
132 extern int __must_check down_write_killable(struct rw_semaphore *sem);
137 extern int down_write_trylock(struct rw_semaphore *sem);
142 extern void up_read(struct rw_semaphore *sem);
147 extern void up_write(struct rw_semaphore *sem);
152 extern void downgrade_write(struct rw_semaphore *sem);
168 extern void down_read_nested(struct rw_semaphore *sem, int subclass);
169 extern void down_write_nested(struct rw_semaphore *sem, int subclass);
170 extern int down_write_killable_nested(struct rw_semaphore *sem, int subclass);
171 extern void _down_write_nest_lock(struct rw_semaphore *sem, struct lockdep_map *nest_lock);
173 # define down_write_nest_lock(sem, nest_lock) \ argument
176 _down_write_nest_lock(sem, &(nest_lock)->dep_map); \
185 extern void down_read_non_owner(struct rw_semaphore *sem);
186 extern void up_read_non_owner(struct rw_semaphore *sem);
188 # define down_read_nested(sem, subclass) down_read(sem) argument
189 # define down_write_nest_lock(sem, nest_lock) down_write(sem) argument
190 # define down_write_nested(sem, subclass) down_write(sem) argument
191 # define down_write_killable_nested(sem, subclass) down_write_killable(sem) argument
192 # define down_read_non_owner(sem) down_read(sem) argument
193 # define up_read_non_owner(sem) up_read(sem) argument