/kernel/locking/ |
D | rtmutex.c | 273 rt_mutex_enqueue(struct rt_mutex *lock, struct rt_mutex_waiter *waiter) in rt_mutex_enqueue() argument 283 if (rt_mutex_waiter_less(waiter, entry)) { in rt_mutex_enqueue() 291 rb_link_node(&waiter->tree_entry, parent, link); in rt_mutex_enqueue() 292 rb_insert_color_cached(&waiter->tree_entry, &lock->waiters, leftmost); in rt_mutex_enqueue() 296 rt_mutex_dequeue(struct rt_mutex *lock, struct rt_mutex_waiter *waiter) in rt_mutex_dequeue() argument 298 if (RB_EMPTY_NODE(&waiter->tree_entry)) in rt_mutex_dequeue() 301 rb_erase_cached(&waiter->tree_entry, &lock->waiters); in rt_mutex_dequeue() 302 RB_CLEAR_NODE(&waiter->tree_entry); in rt_mutex_dequeue() 306 rt_mutex_enqueue_pi(struct task_struct *task, struct rt_mutex_waiter *waiter) in rt_mutex_enqueue_pi() argument 316 if (rt_mutex_waiter_less(waiter, entry)) { in rt_mutex_enqueue_pi() [all …]
|
D | mutex-debug.c | 30 void debug_mutex_lock_common(struct mutex *lock, struct mutex_waiter *waiter) in debug_mutex_lock_common() argument 32 memset(waiter, MUTEX_DEBUG_INIT, sizeof(*waiter)); in debug_mutex_lock_common() 33 waiter->magic = waiter; in debug_mutex_lock_common() 34 INIT_LIST_HEAD(&waiter->list); in debug_mutex_lock_common() 37 void debug_mutex_wake_waiter(struct mutex *lock, struct mutex_waiter *waiter) in debug_mutex_wake_waiter() argument 41 DEBUG_LOCKS_WARN_ON(waiter->magic != waiter); in debug_mutex_wake_waiter() 42 DEBUG_LOCKS_WARN_ON(list_empty(&waiter->list)); in debug_mutex_wake_waiter() 45 void debug_mutex_free_waiter(struct mutex_waiter *waiter) in debug_mutex_free_waiter() argument 47 DEBUG_LOCKS_WARN_ON(!list_empty(&waiter->list)); in debug_mutex_free_waiter() 48 memset(waiter, MUTEX_DEBUG_FREE, sizeof(*waiter)); in debug_mutex_free_waiter() [all …]
|
D | mutex.c | 200 static inline bool __mutex_waiter_is_first(struct mutex *lock, struct mutex_waiter *waiter) in __mutex_waiter_is_first() argument 202 return list_first_entry(&lock->wait_list, struct mutex_waiter, list) == waiter; in __mutex_waiter_is_first() 210 __mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter, in __mutex_add_waiter() argument 213 debug_mutex_add_waiter(lock, waiter, current); in __mutex_add_waiter() 215 list_add_tail(&waiter->list, list); in __mutex_add_waiter() 216 if (__mutex_waiter_is_first(lock, waiter)) in __mutex_add_waiter() 221 __mutex_remove_waiter(struct mutex *lock, struct mutex_waiter *waiter) in __mutex_remove_waiter() argument 223 list_del(&waiter->list); in __mutex_remove_waiter() 227 debug_mutex_remove_waiter(lock, waiter, current); in __mutex_remove_waiter() 379 __ww_mutex_die(struct mutex *lock, struct mutex_waiter *waiter, in __ww_mutex_die() argument [all …]
|
D | rtmutex-debug.c | 87 void debug_rt_mutex_print_deadlock(struct rt_mutex_waiter *waiter) in debug_rt_mutex_print_deadlock() argument 91 if (!waiter->deadlock_lock || !debug_locks) in debug_rt_mutex_print_deadlock() 95 task = pid_task(waiter->deadlock_task_pid, PIDTYPE_PID); in debug_rt_mutex_print_deadlock() 117 printk_lock(waiter->lock, 1); in debug_rt_mutex_print_deadlock() 121 printk_lock(waiter->deadlock_lock, 1); in debug_rt_mutex_print_deadlock() 158 void debug_rt_mutex_init_waiter(struct rt_mutex_waiter *waiter) in debug_rt_mutex_init_waiter() argument 160 memset(waiter, 0x11, sizeof(*waiter)); in debug_rt_mutex_init_waiter() 161 waiter->deadlock_task_pid = NULL; in debug_rt_mutex_init_waiter() 164 void debug_rt_mutex_free_waiter(struct rt_mutex_waiter *waiter) in debug_rt_mutex_free_waiter() argument 166 put_pid(waiter->deadlock_task_pid); in debug_rt_mutex_free_waiter() [all …]
|
D | rwsem.c | 409 struct rwsem_waiter *waiter, *tmp; in rwsem_mark_wake() local 419 waiter = rwsem_first_waiter(sem); in rwsem_mark_wake() 421 if (waiter->type == RWSEM_WAITING_FOR_WRITE) { in rwsem_mark_wake() 430 wake_q_add(wake_q, waiter->task); in rwsem_mark_wake() 460 time_after(jiffies, waiter->timeout)) { in rwsem_mark_wake() 474 owner = waiter->task; in rwsem_mark_wake() 475 if (waiter->last_rowner & RWSEM_RD_NONSPINNABLE) { in rwsem_mark_wake() 506 list_for_each_entry_safe(waiter, tmp, &sem->wait_list, list) { in rwsem_mark_wake() 507 if (waiter->type == RWSEM_WAITING_FOR_WRITE) in rwsem_mark_wake() 511 list_move_tail(&waiter->list, &wlist); in rwsem_mark_wake() [all …]
|
D | semaphore.c | 207 struct semaphore_waiter waiter; in __down_common() local 209 list_add_tail(&waiter.list, &sem->wait_list); in __down_common() 210 waiter.task = current; in __down_common() 211 waiter.up = false; in __down_common() 222 if (waiter.up) in __down_common() 227 list_del(&waiter.list); in __down_common() 231 list_del(&waiter.list); in __down_common() 257 struct semaphore_waiter *waiter = list_first_entry(&sem->wait_list, in __up() local 259 list_del(&waiter->list); in __up() 260 waiter->up = true; in __up() [all …]
|
D | rtmutex-debug.h | 13 extern void debug_rt_mutex_init_waiter(struct rt_mutex_waiter *waiter); 14 extern void debug_rt_mutex_free_waiter(struct rt_mutex_waiter *waiter); 22 struct rt_mutex_waiter *waiter, 24 extern void debug_rt_mutex_print_deadlock(struct rt_mutex_waiter *waiter); 28 static inline bool debug_rt_mutex_detect_deadlock(struct rt_mutex_waiter *waiter, in debug_rt_mutex_detect_deadlock() argument 31 return (waiter != NULL); in debug_rt_mutex_detect_deadlock()
|
D | mutex.h | 13 #define debug_mutex_wake_waiter(lock, waiter) do { } while (0) argument 14 #define debug_mutex_free_waiter(waiter) do { } while (0) argument 15 #define debug_mutex_add_waiter(lock, waiter, ti) do { } while (0) argument 16 #define debug_mutex_remove_waiter(lock, waiter, ti) do { } while (0) argument 21 debug_mutex_lock_common(struct mutex *lock, struct mutex_waiter *waiter) in debug_mutex_lock_common() argument
|
D | mutex-debug.h | 18 struct mutex_waiter *waiter); 20 struct mutex_waiter *waiter); 21 extern void debug_mutex_free_waiter(struct mutex_waiter *waiter); 23 struct mutex_waiter *waiter, 25 extern void debug_mutex_remove_waiter(struct mutex *lock, struct mutex_waiter *waiter,
|
D | rtmutex_common.h | 137 extern void rt_mutex_init_waiter(struct rt_mutex_waiter *waiter); 139 struct rt_mutex_waiter *waiter, 142 struct rt_mutex_waiter *waiter, 146 struct rt_mutex_waiter *waiter); 148 struct rt_mutex_waiter *waiter);
|
/kernel/printk/ |
D | printk.c | 1706 int waiter; in console_lock_spinning_disable_and_check() local 1709 waiter = READ_ONCE(console_waiter); in console_lock_spinning_disable_and_check() 1713 if (!waiter) { in console_lock_spinning_disable_and_check() 1744 bool waiter; in console_trylock_spinning() local 1755 waiter = READ_ONCE(console_waiter); in console_trylock_spinning() 1756 if (!waiter && owner && owner != current) { in console_trylock_spinning()
|