Lines Matching refs:lock

147 extern void lockdep_reset_lock(struct lockdep_map *lock);
185 extern void lockdep_init_map_type(struct lockdep_map *lock, const char *name,
189 lockdep_init_map_waits(struct lockdep_map *lock, const char *name, in lockdep_init_map_waits() argument
192 lockdep_init_map_type(lock, name, key, subclass, inner, outer, LD_LOCK_NORMAL); in lockdep_init_map_waits()
196 lockdep_init_map_wait(struct lockdep_map *lock, const char *name, in lockdep_init_map_wait() argument
199 lockdep_init_map_waits(lock, name, key, subclass, inner, LD_WAIT_INV); in lockdep_init_map_wait()
202 static inline void lockdep_init_map(struct lockdep_map *lock, const char *name, in lockdep_init_map() argument
205 lockdep_init_map_wait(lock, name, key, subclass, LD_WAIT_INV); in lockdep_init_map()
214 #define lockdep_set_class(lock, key) \ argument
215 lockdep_init_map_type(&(lock)->dep_map, #key, key, 0, \
216 (lock)->dep_map.wait_type_inner, \
217 (lock)->dep_map.wait_type_outer, \
218 (lock)->dep_map.lock_type)
220 #define lockdep_set_class_and_name(lock, key, name) \ argument
221 lockdep_init_map_type(&(lock)->dep_map, name, key, 0, \
222 (lock)->dep_map.wait_type_inner, \
223 (lock)->dep_map.wait_type_outer, \
224 (lock)->dep_map.lock_type)
226 #define lockdep_set_class_and_subclass(lock, key, sub) \ argument
227 lockdep_init_map_type(&(lock)->dep_map, #key, key, sub, \
228 (lock)->dep_map.wait_type_inner, \
229 (lock)->dep_map.wait_type_outer, \
230 (lock)->dep_map.lock_type)
232 #define lockdep_set_subclass(lock, sub) \ argument
233 lockdep_init_map_type(&(lock)->dep_map, #lock, (lock)->dep_map.key, sub,\
234 (lock)->dep_map.wait_type_inner, \
235 (lock)->dep_map.wait_type_outer, \
236 (lock)->dep_map.lock_type)
238 #define lockdep_set_novalidate_class(lock) \ argument
239 lockdep_set_class_and_name(lock, &__lockdep_no_validate__, #lock)
244 #define lockdep_match_class(lock, key) lockdep_match_key(&(lock)->dep_map, key) argument
246 static inline int lockdep_match_key(struct lockdep_map *lock, in lockdep_match_key() argument
249 return lock->key == key; in lockdep_match_key()
266 extern void lock_acquire(struct lockdep_map *lock, unsigned int subclass,
270 extern void lock_release(struct lockdep_map *lock, unsigned long ip);
272 extern void lock_sync(struct lockdep_map *lock, unsigned int subclass,
284 extern int lock_is_held_type(const struct lockdep_map *lock, int read);
286 static inline int lock_is_held(const struct lockdep_map *lock) in lock_is_held() argument
288 return lock_is_held_type(lock, -1); in lock_is_held()
291 #define lockdep_is_held(lock) lock_is_held(&(lock)->dep_map) argument
292 #define lockdep_is_held_type(lock, r) lock_is_held_type(&(lock)->dep_map, (r)) argument
294 extern void lock_set_class(struct lockdep_map *lock, const char *name,
301 static inline void lock_set_subclass(struct lockdep_map *lock, in lock_set_subclass() argument
304 lock_set_class(lock, lock->name, lock->key, subclass, ip); in lock_set_subclass()
307 extern void lock_downgrade(struct lockdep_map *lock, unsigned long ip);
311 extern struct pin_cookie lock_pin_lock(struct lockdep_map *lock);
312 extern void lock_repin_lock(struct lockdep_map *lock, struct pin_cookie);
313 extern void lock_unpin_lock(struct lockdep_map *lock, struct pin_cookie);
382 # define lockdep_init_map_type(lock, name, key, sub, inner, outer, type) \ argument
384 # define lockdep_init_map_waits(lock, name, key, sub, inner, outer) \ argument
386 # define lockdep_init_map_wait(lock, name, key, sub, inner) \ argument
388 # define lockdep_init_map(lock, name, key, sub) \ argument
390 # define lockdep_set_class(lock, key) do { (void)(key); } while (0) argument
391 # define lockdep_set_class_and_name(lock, key, name) \ argument
393 #define lockdep_set_class_and_subclass(lock, key, sub) \ argument
395 #define lockdep_set_subclass(lock, sub) do { } while (0) argument
397 #define lockdep_set_novalidate_class(lock) do { } while (0) argument
453 #define lock_set_cmp_fn(lock, ...) lockdep_set_lock_cmp_fn(&(lock)->dep_map, __VA_ARGS__) argument
455 #define lock_set_cmp_fn(lock, ...) do { } while (0) argument
476 extern void lock_contended(struct lockdep_map *lock, unsigned long ip);
477 extern void lock_acquired(struct lockdep_map *lock, unsigned long ip);
479 #define LOCK_CONTENDED(_lock, try, lock) \ argument
483 lock(_lock); \
488 #define LOCK_CONTENDED_RETURN(_lock, try, lock) \ argument
493 ____err = lock(_lock); \
505 #define LOCK_CONTENDED(_lock, try, lock) \ argument
506 lock(_lock)
508 #define LOCK_CONTENDED_RETURN(_lock, try, lock) \ argument
509 lock(_lock)
587 # define might_lock(lock) \ argument
589 typecheck(struct lockdep_map *, &(lock)->dep_map); \
590 lock_acquire(&(lock)->dep_map, 0, 0, 0, 1, NULL, _THIS_IP_); \
591 lock_release(&(lock)->dep_map, _THIS_IP_); \
593 # define might_lock_read(lock) \ argument
595 typecheck(struct lockdep_map *, &(lock)->dep_map); \
596 lock_acquire(&(lock)->dep_map, 0, 0, 1, 1, NULL, _THIS_IP_); \
597 lock_release(&(lock)->dep_map, _THIS_IP_); \
599 # define might_lock_nested(lock, subclass) \ argument
601 typecheck(struct lockdep_map *, &(lock)->dep_map); \
602 lock_acquire(&(lock)->dep_map, subclass, 0, 1, 1, NULL, \
604 lock_release(&(lock)->dep_map, _THIS_IP_); \
661 # define might_lock(lock) do { } while (0) argument
662 # define might_lock_read(lock) do { } while (0) argument
663 # define might_lock_nested(lock, subclass) do { } while (0) argument