/linux-6.3-rc2/kernel/locking/ |
A D | mutex-debug.c | 30 memset(waiter, MUTEX_DEBUG_INIT, sizeof(*waiter)); in debug_mutex_lock_common() 31 waiter->magic = waiter; in debug_mutex_lock_common() 32 INIT_LIST_HEAD(&waiter->list); in debug_mutex_lock_common() 33 waiter->ww_ctx = MUTEX_POISON_WW_CTX; in debug_mutex_lock_common() 40 DEBUG_LOCKS_WARN_ON(waiter->magic != waiter); in debug_mutex_wake_waiter() 41 DEBUG_LOCKS_WARN_ON(list_empty(&waiter->list)); in debug_mutex_wake_waiter() 47 memset(waiter, MUTEX_DEBUG_FREE, sizeof(*waiter)); in debug_mutex_free_waiter() 56 task->blocked_on = waiter; in debug_mutex_add_waiter() 63 DEBUG_LOCKS_WARN_ON(waiter->task != task); in debug_mutex_remove_waiter() 67 INIT_LIST_HEAD(&waiter->list); in debug_mutex_remove_waiter() [all …]
|
A D | rtmutex.c | 396 if (rt_prio(waiter->prio) || dl_prio(waiter->prio)) in rt_mutex_steal() 541 return waiter != NULL; in rt_mutex_cond_detect_deadlock() 672 waiter = task->pi_blocked_on; in rt_mutex_adjust_prio_chain() 683 if (!waiter) in rt_mutex_adjust_prio_chain() 769 lock = waiter->lock; in rt_mutex_adjust_prio_chain() 1044 if (waiter) { in try_to_take_rt_mutex() 1051 if (waiter == top_waiter || rt_mutex_steal(waiter, top_waiter)) { in try_to_take_rt_mutex() 1154 waiter->task = task; in task_blocks_on_rt_mutex() 1155 waiter->lock = lock; in task_blocks_on_rt_mutex() 1660 waiter.ww_ctx = ww_ctx; in __rt_mutex_slowlock_locked() [all …]
|
A D | rtmutex_common.h | 68 struct rt_mutex_waiter *waiter, 71 struct rt_mutex_waiter *waiter, 77 struct rt_mutex_waiter *waiter); 104 struct rt_mutex_waiter *waiter) in rt_mutex_waiter_is_top_waiter() argument 181 memset(waiter, 0x11, sizeof(*waiter)); in debug_rt_mutex_init_waiter() 187 memset(waiter, 0x22, sizeof(*waiter)); in debug_rt_mutex_free_waiter() 192 debug_rt_mutex_init_waiter(waiter); in rt_mutex_init_waiter() 194 RB_CLEAR_NODE(&waiter->tree_entry); in rt_mutex_init_waiter() 195 waiter->wake_state = TASK_NORMAL; in rt_mutex_init_waiter() 196 waiter->task = NULL; in rt_mutex_init_waiter() [all …]
|
A D | mutex.h | 25 struct mutex_waiter *waiter); 27 struct mutex_waiter *waiter); 28 extern void debug_mutex_free_waiter(struct mutex_waiter *waiter); 30 struct mutex_waiter *waiter, 32 extern void debug_mutex_remove_waiter(struct mutex *lock, struct mutex_waiter *waiter, 38 # define debug_mutex_lock_common(lock, waiter) do { } while (0) argument 39 # define debug_mutex_wake_waiter(lock, waiter) do { } while (0) argument 40 # define debug_mutex_free_waiter(waiter) do { } while (0) argument 41 # define debug_mutex_add_waiter(lock, waiter, ti) do { } while (0) argument 42 # define debug_mutex_remove_waiter(lock, waiter, ti) do { } while (0) argument
|
A D | mutex.c | 218 list_del(&waiter->list); in __mutex_remove_waiter() 305 struct mutex_waiter *waiter) in ww_mutex_spin_on_owner() argument 339 if (waiter && !__mutex_waiter_is_first(lock, waiter)) in ww_mutex_spin_on_owner() 444 if (!waiter) { in mutex_optimistic_spin() 488 if (!waiter) in mutex_optimistic_spin() 495 if (!waiter) in mutex_optimistic_spin() 573 struct mutex_waiter waiter; in __mutex_lock_common() local 629 waiter.task = current; in __mutex_lock_common() 631 waiter.ww_ctx = ww_ctx; in __mutex_lock_common() 936 struct mutex_waiter *waiter = in __mutex_unlock_slowpath() local [all …]
|
A D | rwsem.c | 389 list_del(&waiter->list); in rwsem_del_waiter() 482 owner = waiter->task; in rwsem_mark_wake() 552 tsk = waiter->task; in rwsem_mark_wake() 663 list_del(&waiter->list); in rwsem_try_write_lock() 1000 struct rwsem_waiter waiter; in rwsem_down_read_slowpath() local 1035 waiter.task = current; in rwsem_down_read_slowpath() 1038 waiter.handoff_set = false; in rwsem_down_read_slowpath() 1080 if (waiter.task) in rwsem_down_read_slowpath() 1109 struct rwsem_waiter waiter; in rwsem_down_write_slowpath() local 1122 waiter.task = current; in rwsem_down_write_slowpath() [all …]
|
A D | semaphore.c | 212 struct semaphore_waiter waiter; in ___down_common() local 214 list_add_tail(&waiter.list, &sem->wait_list); in ___down_common() 215 waiter.task = current; in ___down_common() 216 waiter.up = false; in ___down_common() 227 if (waiter.up) in ___down_common() 232 list_del(&waiter.list); in ___down_common() 236 list_del(&waiter.list); in ___down_common() 274 struct semaphore_waiter *waiter = list_first_entry(&sem->wait_list, in __up() local 276 list_del(&waiter->list); in __up() 277 waiter->up = true; in __up() [all …]
|
A D | rtmutex_api.c | 293 struct rt_mutex_waiter *waiter, in __rt_mutex_start_proxy_lock() argument 340 struct rt_mutex_waiter *waiter, in rt_mutex_start_proxy_lock() argument 348 remove_waiter(lock, waiter); in rt_mutex_start_proxy_lock() 373 struct rt_mutex_waiter *waiter) in rt_mutex_wait_proxy_lock() argument 412 struct rt_mutex_waiter *waiter) in rt_mutex_cleanup_proxy_lock() argument 428 try_to_take_rt_mutex(lock, current, waiter); in rt_mutex_cleanup_proxy_lock() 434 remove_waiter(lock, waiter); in rt_mutex_cleanup_proxy_lock() 455 struct rt_mutex_waiter *waiter; in rt_mutex_adjust_pi() local 461 waiter = task->pi_blocked_on; in rt_mutex_adjust_pi() 462 if (!waiter || rt_mutex_waiter_equal(waiter, task_to_waiter(task))) { in rt_mutex_adjust_pi() [all …]
|
A D | ww_mutex.h | 53 __ww_waiter_add(struct mutex *lock, struct mutex_waiter *waiter, struct mutex_waiter *pos) in __ww_waiter_add() argument 58 __mutex_add_waiter(lock, waiter, p); in __ww_waiter_add() 277 __ww_mutex_die(struct MUTEX *lock, struct MUTEX_WAITER *waiter, in __ww_mutex_die() argument 283 if (waiter->ww_ctx->acquired > 0 && __ww_ctx_less(waiter->ww_ctx, ww_ctx)) { in __ww_mutex_die() 285 debug_mutex_wake_waiter(lock, waiter); in __ww_mutex_die() 287 wake_up_process(waiter->task); in __ww_mutex_die() 441 __ww_mutex_check_kill(struct MUTEX *lock, struct MUTEX_WAITER *waiter, in __ww_mutex_check_kill() argument 465 for (cur = __ww_waiter_prev(lock, waiter); cur; in __ww_mutex_check_kill() 489 __ww_mutex_add_waiter(struct MUTEX_WAITER *waiter, in __ww_mutex_add_waiter() argument 497 __ww_waiter_add(lock, waiter, NULL); in __ww_mutex_add_waiter() [all …]
|
/linux-6.3-rc2/drivers/tty/ |
A D | tty_ldsem.c | 95 tsk = waiter->task; in __ldsem_wake_readers() 121 struct ldsem_waiter *waiter; in __ldsem_wake_writer() local 124 wake_up_process(waiter->task); in __ldsem_wake_writer() 158 struct ldsem_waiter waiter; in down_read_failed() local 183 waiter.task = current; in down_read_failed() 212 if (waiter.task) { in down_read_failed() 215 list_del(&waiter.list); in down_read_failed() 217 put_task_struct(waiter.task); in down_read_failed() 232 struct ldsem_waiter waiter; in down_write_failed() local 255 waiter.task = current; in down_write_failed() [all …]
|
/linux-6.3-rc2/lib/ |
A D | klist.c | 185 struct klist_waiter *waiter, *tmp; in klist_release() local 192 if (waiter->node != n) in klist_release() 195 list_del(&waiter->list); in klist_release() 196 waiter->woken = 1; in klist_release() 198 wake_up_process(waiter->process); in klist_release() 240 struct klist_waiter waiter; in klist_remove() local 242 waiter.node = n; in klist_remove() 243 waiter.process = current; in klist_remove() 244 waiter.woken = 0; in klist_remove() 246 list_add(&waiter.list, &klist_remove_waiters); in klist_remove() [all …]
|
/linux-6.3-rc2/tools/testing/selftests/filesystems/epoll/ |
A D | epoll_wakeup_test.c | 23 pthread_t waiter; member 47 pthread_kill(ctx->waiter, SIGUSR1); in kill_timeout() 495 ASSERT_EQ(pthread_join(ctx.waiter, NULL), 0); in TEST() 538 ASSERT_EQ(pthread_join(ctx.waiter, NULL), 0); in TEST() 585 ASSERT_EQ(pthread_join(ctx.waiter, NULL), 0); in TEST() 634 ASSERT_EQ(pthread_join(ctx.waiter, NULL), 0); in TEST() 679 ASSERT_EQ(pthread_join(ctx.waiter, NULL), 0); in TEST() 722 ASSERT_EQ(pthread_join(ctx.waiter, NULL), 0); in TEST() 769 ASSERT_EQ(pthread_join(ctx.waiter, NULL), 0); in TEST() 818 ASSERT_EQ(pthread_join(ctx.waiter, NULL), 0); in TEST() [all …]
|
/linux-6.3-rc2/tools/testing/selftests/futex/functional/ |
A D | futex_requeue_pi_signal_restart.c | 122 pthread_t waiter; in main() local 158 res = create_rt_thread(&waiter, waiterfn, NULL, SCHED_FIFO, 1); in main() 177 pthread_kill(waiter, SIGUSR1); in main() 208 pthread_kill(waiter, SIGUSR1); in main() 210 pthread_join(waiter, NULL); in main()
|
A D | futex_wait.c | 53 pthread_t waiter; in main() local 81 if (pthread_create(&waiter, NULL, waiterfn, (void *) &flags)) in main() 109 if (pthread_create(&waiter, NULL, waiterfn, NULL)) in main() 148 if (pthread_create(&waiter, NULL, waiterfn, NULL)) in main()
|
A D | futex_requeue.c | 43 pthread_t waiter[10]; in main() local 76 if (pthread_create(&waiter[0], NULL, waiterfn, NULL)) in main() 108 if (pthread_create(&waiter[i], NULL, waiterfn, NULL)) in main()
|
A D | futex_waitv.c | 62 pthread_t waiter; in main() local 97 if (pthread_create(&waiter, NULL, waiterfn, NULL)) in main() 130 if (pthread_create(&waiter, NULL, waiterfn, NULL)) in main()
|
/linux-6.3-rc2/Documentation/locking/ |
A D | futex-requeue-pi.rst | 20 implementation would wake the highest-priority waiter, and leave the 92 The requeue code cannot simply wake the waiter and leave it to 94 requeue call returning to user space and the waiter waking and 100 of the waiter and to enqueue the waiter on a contended rt_mutex. 104 FUTEX_WAIT_REQUEUE_PI is called by the waiter (pthread_cond_wait() 116 PI futex on behalf of the top waiter. If it can, this waiter is 120 task as a waiter on the underlying rt_mutex. It is possible that 122 waiter is woken to finish the acquisition of the lock.
|
A D | rt-mutex-design.rst | 100 waiter 101 - A waiter is a struct that is stored on the stack of a blocked 104 the waiter on the process's stack (local variable). This 111 on a mutex. This is the same as waiter->task. 116 top waiter 119 top pi waiter 360 pi waiter to its own normal/deadline priority and take the higher one. 398 is blocked, and a top_task as the top waiter of the mutex. 433 scope of this function. The waiter structure holds the nodes to store 465 the lock's waiter tree and propagate the pi chain of the lock as well [all …]
|
A D | rt-mutex.rst | 20 priority waiter until the rt-mutex is released. If the temporarily 32 The enqueueing of the waiters into the rtmutex waiter tree is done in 34 rtmutex, only the top priority waiter is enqueued into the owner's 36 the top priority waiter of a task changes (for example it timed out or 56 NULL 1 lock is free and has waiters and the top waiter
|
/linux-6.3-rc2/fs/ |
A D | locks.c | 646 hash_add(blocked_hash, &waiter->fl_link, posix_owner_key(waiter)); in locks_insert_global_blocked() 653 hash_del(&waiter->fl_link); in locks_delete_global_blocked() 670 struct file_lock *waiter; in __locks_wake_up_blocks() local 675 if (waiter->fl_lmops && waiter->fl_lmops->lm_notify) in __locks_wake_up_blocks() 676 waiter->fl_lmops->lm_notify(waiter); in __locks_wake_up_blocks() 678 wake_up(&waiter->fl_wait); in __locks_wake_up_blocks() 725 if (waiter->fl_blocker) in locks_delete_block() 728 __locks_delete_block(waiter); in locks_delete_block() 756 struct file_lock *waiter, in __locks_insert_block() argument 765 if (conflict(fl, waiter)) { in __locks_insert_block() [all …]
|
/linux-6.3-rc2/drivers/staging/vc04_services/interface/vchiq_arm/ |
A D | vchiq_dev.c | 302 waiter = kzalloc(sizeof(*waiter), GFP_KERNEL); in vchiq_irq_queue_bulk_tx_rx() 303 if (!waiter) { in vchiq_irq_queue_bulk_tx_rx() 308 userdata = &waiter->bulk_waiter; in vchiq_irq_queue_bulk_tx_rx() 315 waiter = iter; in vchiq_irq_queue_bulk_tx_rx() 320 if (!waiter) { in vchiq_irq_queue_bulk_tx_rx() 328 userdata = &waiter->bulk_waiter; in vchiq_irq_queue_bulk_tx_rx() 336 if (!waiter) { in vchiq_irq_queue_bulk_tx_rx() 342 !waiter->bulk_waiter.bulk) { in vchiq_irq_queue_bulk_tx_rx() 343 if (waiter->bulk_waiter.bulk) { in vchiq_irq_queue_bulk_tx_rx() 349 kfree(waiter); in vchiq_irq_queue_bulk_tx_rx() [all …]
|
A D | vchiq_arm.c | 722 list_for_each_entry_safe(waiter, next, in free_bulk_waiter() 724 list_del(&waiter->list); in free_bulk_waiter() 726 waiter, waiter->pid); in free_bulk_waiter() 727 kfree(waiter); in free_bulk_waiter() 937 waiter = iter; in vchiq_blocking_bulk_transfer() 943 if (waiter) { in vchiq_blocking_bulk_transfer() 960 waiter = kzalloc(sizeof(*waiter), GFP_KERNEL); in vchiq_blocking_bulk_transfer() 961 if (!waiter) { in vchiq_blocking_bulk_transfer() 968 &waiter->bulk_waiter, in vchiq_blocking_bulk_transfer() 979 kfree(waiter); in vchiq_blocking_bulk_transfer() [all …]
|
/linux-6.3-rc2/drivers/gpu/drm/amd/amdkfd/ |
A D | kfd_events.c | 263 struct kfd_event_waiter *waiter; in destroy_event() local 268 WRITE_ONCE(waiter->event, NULL); in destroy_event() 624 struct kfd_event_waiter *waiter; in set_event() local 634 WRITE_ONCE(waiter->activated, true); in set_event() 793 struct kfd_event_waiter *waiter, in init_event_waiter() argument 802 waiter->event = ev; in init_event_waiter() 803 waiter->activated = ev->signaled; in init_event_waiter() 805 if (!waiter->activated) in init_event_waiter() 854 struct kfd_event_waiter *waiter; in copy_signaled_event_data() local 859 waiter = &event_waiters[i]; in copy_signaled_event_data() [all …]
|
/linux-6.3-rc2/drivers/md/persistent-data/ |
A D | dm-block-manager.c | 55 struct waiter { struct 122 static void __wait(struct waiter *w) in __wait() 136 static void __wake_waiter(struct waiter *w) in __wake_waiter() 152 struct waiter *w, *tmp; in __wake_many() 196 struct waiter w; in bl_down_read() 259 struct waiter w; in bl_down_write()
|
/linux-6.3-rc2/fs/iomap/ |
A D | direct-io.c | 43 struct task_struct *waiter; member 167 struct task_struct *waiter = dio->submit.waiter; in iomap_dio_bio_end_io() local 168 WRITE_ONCE(dio->submit.waiter, NULL); in iomap_dio_bio_end_io() 169 blk_wake_io_task(waiter); in iomap_dio_bio_end_io() 513 dio->submit.waiter = current; in __iomap_dio_rw() 658 if (!READ_ONCE(dio->submit.waiter)) in __iomap_dio_rw()
|