Lines Matching refs:sem

69 static inline int rwsem_is_locked(struct rw_semaphore *sem)  in rwsem_is_locked()  argument
71 return atomic_long_read(&sem->count) != 0; in rwsem_is_locked()
103 extern void __init_rwsem(struct rw_semaphore *sem, const char *name,
106 #define init_rwsem(sem) \ argument
110 __init_rwsem((sem), #sem, &__key); \
119 static inline int rwsem_is_contended(struct rw_semaphore *sem) in rwsem_is_contended() argument
121 return !list_empty(&sem->wait_list); in rwsem_is_contended()
147 #define init_rwsem(sem) \ argument
151 __init_rwsem((sem), #sem, &__key); \
154 static __always_inline int rwsem_is_locked(struct rw_semaphore *sem) in rwsem_is_locked() argument
156 return rw_base_is_locked(&sem->rwbase); in rwsem_is_locked()
159 static __always_inline int rwsem_is_contended(struct rw_semaphore *sem) in rwsem_is_contended() argument
161 return rw_base_is_contended(&sem->rwbase); in rwsem_is_contended()
174 extern void down_read(struct rw_semaphore *sem);
175 extern int __must_check down_read_interruptible(struct rw_semaphore *sem);
176 extern int __must_check down_read_killable(struct rw_semaphore *sem);
181 extern int down_read_trylock(struct rw_semaphore *sem);
186 extern void down_write(struct rw_semaphore *sem);
187 extern int __must_check down_write_killable(struct rw_semaphore *sem);
192 extern int down_write_trylock(struct rw_semaphore *sem);
197 extern void up_read(struct rw_semaphore *sem);
202 extern void up_write(struct rw_semaphore *sem);
207 extern void downgrade_write(struct rw_semaphore *sem);
223 extern void down_read_nested(struct rw_semaphore *sem, int subclass);
224 extern int __must_check down_read_killable_nested(struct rw_semaphore *sem, int subclass);
225 extern void down_write_nested(struct rw_semaphore *sem, int subclass);
226 extern int down_write_killable_nested(struct rw_semaphore *sem, int subclass);
227 extern void _down_write_nest_lock(struct rw_semaphore *sem, struct lockdep_map *nest_lock);
229 # define down_write_nest_lock(sem, nest_lock) \ argument
232 _down_write_nest_lock(sem, &(nest_lock)->dep_map); \
241 extern void down_read_non_owner(struct rw_semaphore *sem);
242 extern void up_read_non_owner(struct rw_semaphore *sem);
244 # define down_read_nested(sem, subclass) down_read(sem) argument
245 # define down_read_killable_nested(sem, subclass) down_read_killable(sem) argument
246 # define down_write_nest_lock(sem, nest_lock) down_write(sem) argument
247 # define down_write_nested(sem, subclass) down_write(sem) argument
248 # define down_write_killable_nested(sem, subclass) down_write_killable(sem) argument
249 # define down_read_non_owner(sem) down_read(sem) argument
250 # define up_read_non_owner(sem) up_read(sem) argument