Lines Matching defs:lock
8 * lock debugging, locking tree, deadlock detection started by:
26 * Must be called with lock->wait_lock held.
28 void debug_mutex_lock_common(struct mutex *lock, struct mutex_waiter *waiter)
36 void debug_mutex_wake_waiter(struct mutex *lock, struct mutex_waiter *waiter)
38 lockdep_assert_held(&lock->wait_lock);
39 DEBUG_LOCKS_WARN_ON(list_empty(&lock->wait_list));
50 void debug_mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter,
53 lockdep_assert_held(&lock->wait_lock);
55 /* Mark the current thread as blocked on the lock: */
59 void debug_mutex_remove_waiter(struct mutex *lock, struct mutex_waiter *waiter,
71 void debug_mutex_unlock(struct mutex *lock)
74 DEBUG_LOCKS_WARN_ON(lock->magic != lock);
75 DEBUG_LOCKS_WARN_ON(!lock->wait_list.prev && !lock->wait_list.next);
79 void debug_mutex_init(struct mutex *lock, const char *name,
84 * Make sure we are not reinitializing a held lock:
86 debug_check_no_locks_freed((void *)lock, sizeof(*lock));
87 lockdep_init_map_wait(&lock->dep_map, name, key, 0, LD_WAIT_SLEEP);
89 lock->magic = lock;
94 * @lock: the mutex to be destroyed
100 void mutex_destroy(struct mutex *lock)
102 DEBUG_LOCKS_WARN_ON(mutex_is_locked(lock));
103 lock->magic = NULL;