Home
last modified time | relevance | path

Searched refs:waiter (Results 1 – 25 of 45) sorted by relevance

12

/linux/kernel/locking/
H A Drtmutex.c36 static inline int __ww_mutex_add_waiter(struct rt_mutex_waiter *waiter, in __ww_mutex_add_waiter() argument
56 struct rt_mutex_waiter *waiter, in __ww_mutex_check_kill() argument
76 * NULL 1 lock is free and has waiters and the top waiter
191 * With the check for the waiter bit in place T3 on CPU2 will not in fixup_rt_mutex_waiters()
279 * If a new waiter comes in between the unlock and the cmpxchg in unlock_rt_mutex_safe()
297 * wake waiter(); in unlock_rt_mutex_safe()
366 * Update the waiter->tree copy of the sort keys.
369 waiter_update_prio(struct rt_mutex_waiter *waiter, struct task_struct *task) in waiter_update_prio() argument
371 lockdep_assert_held(&waiter->lock->wait_lock); in waiter_update_prio()
372 lockdep_assert(RB_EMPTY_NODE(&waiter in waiter_update_prio()
382 waiter_clone_prio(struct rt_mutex_waiter * waiter,struct task_struct * task) waiter_clone_prio() argument
436 rt_mutex_steal(struct rt_mutex_waiter * waiter,struct rt_mutex_waiter * top_waiter) rt_mutex_steal() argument
486 rt_mutex_enqueue(struct rt_mutex_base * lock,struct rt_mutex_waiter * waiter) rt_mutex_enqueue() argument
494 rt_mutex_dequeue(struct rt_mutex_base * lock,struct rt_mutex_waiter * waiter) rt_mutex_dequeue() argument
514 rt_mutex_enqueue_pi(struct task_struct * task,struct rt_mutex_waiter * waiter) rt_mutex_enqueue_pi() argument
522 rt_mutex_dequeue_pi(struct task_struct * task,struct rt_mutex_waiter * waiter) rt_mutex_dequeue_pi() argument
598 rt_mutex_cond_detect_deadlock(struct rt_mutex_waiter * waiter,enum rtmutex_chainwalk chwalk) rt_mutex_cond_detect_deadlock() argument
691 struct rt_mutex_waiter *waiter, *top_waiter = orig_waiter; rt_mutex_adjust_prio_chain() local
1094 try_to_take_rt_mutex(struct rt_mutex_base * lock,struct task_struct * task,struct rt_mutex_waiter * waiter) try_to_take_rt_mutex() argument
1210 task_blocks_on_rt_mutex(struct rt_mutex_base * lock,struct rt_mutex_waiter * waiter,struct task_struct * task,struct ww_acquire_ctx * ww_ctx,enum rtmutex_chainwalk chwalk,struct wake_q_head * wake_q) task_blocks_on_rt_mutex() argument
1323 struct rt_mutex_waiter *waiter; mark_wakeup_next_waiter() local
1491 rtmutex_spin_on_owner(struct rt_mutex_base * lock,struct rt_mutex_waiter * waiter,struct task_struct * owner) rtmutex_spin_on_owner() argument
1528 rtmutex_spin_on_owner(struct rt_mutex_base * lock,struct rt_mutex_waiter * waiter,struct task_struct * owner) rtmutex_spin_on_owner() argument
1551 remove_waiter(struct rt_mutex_base * lock,struct rt_mutex_waiter * waiter) remove_waiter() argument
1624 rt_mutex_slowlock_block(struct rt_mutex_base * lock,struct ww_acquire_ctx * ww_ctx,unsigned int state,struct hrtimer_sleeper * timeout,struct rt_mutex_waiter * waiter,struct wake_q_head * wake_q) rt_mutex_slowlock_block() argument
1714 __rt_mutex_slowlock(struct rt_mutex_base * lock,struct ww_acquire_ctx * ww_ctx,unsigned int state,enum rtmutex_chainwalk chwalk,struct rt_mutex_waiter * waiter,struct wake_q_head * wake_q) __rt_mutex_slowlock() argument
1776 struct rt_mutex_waiter waiter; __rt_mutex_slowlock_locked() local
1855 struct rt_mutex_waiter waiter; rtlock_slowlock_locked() local
[all...]
H A Dmutex.c201 * Add @waiter to the @lock wait_list and set the FLAG_WAITERS flag if it's
202 * the first waiter.
204 * When @pos, @waiter is added before the waiter indicated by @pos. Otherwise
205 * @waiter will be added to the tail of the list.
208 __mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter, in __mutex_add_waiter() argument
215 debug_mutex_add_waiter(lock, waiter, current); in __mutex_add_waiter()
219 * Insert @waiter before @pos. in __mutex_add_waiter()
221 list_add_tail(&waiter->list, &pos->list); in __mutex_add_waiter()
223 * If @pos == @first, then @waiter wil in __mutex_add_waiter()
241 __mutex_remove_waiter(struct mutex * lock,struct mutex_waiter * waiter) __mutex_remove_waiter() argument
338 ww_mutex_spin_on_owner(struct mutex * lock,struct ww_acquire_ctx * ww_ctx,struct mutex_waiter * waiter) ww_mutex_spin_on_owner() argument
386 mutex_spin_on_owner(struct mutex * lock,struct task_struct * owner,struct ww_acquire_ctx * ww_ctx,struct mutex_waiter * waiter) mutex_spin_on_owner() argument
475 mutex_optimistic_spin(struct mutex * lock,struct ww_acquire_ctx * ww_ctx,struct mutex_waiter * waiter) mutex_optimistic_spin() argument
551 mutex_optimistic_spin(struct mutex * lock,struct ww_acquire_ctx * ww_ctx,struct mutex_waiter * waiter) mutex_optimistic_spin() argument
615 struct mutex_waiter waiter; __mutex_lock_common() local
984 struct mutex_waiter *waiter; __mutex_unlock_slowpath() local
[all...]
H A Drtmutex_api.c204 * @wqh: The wake queue head from which to get the next lock waiter in __rt_mutex_futex_unlock()
318 * @waiter: the pre-initialized rt_mutex_waiter in __rt_mutex_start_proxy_lock()
322 * Starts the rt_mutex acquire; it enqueues the @waiter and does deadlock in __rt_mutex_start_proxy_lock()
325 * NOTE: does _NOT_ remove the @waiter on failure; must either call in __rt_mutex_start_proxy_lock()
336 struct rt_mutex_waiter *waiter, in __rt_mutex_start_proxy_lock()
349 ret = task_blocks_on_rt_mutex(lock, waiter, task, NULL,
357 * pi chain. Let the waiter sort it out.
368 * @waiter: the pre-initialized rt_mutex_waiter in rt_mutex_start_proxy_lock()
371 * Starts the rt_mutex acquire; it enqueues the @waiter and does deadlock in rt_mutex_start_proxy_lock()
374 * NOTE: unlike __rt_mutex_start_proxy_lock this _DOES_ remove the @waiter in rt_mutex_start_proxy_lock()
312 __rt_mutex_start_proxy_lock(struct rt_mutex_base * lock,struct rt_mutex_waiter * waiter,struct task_struct * task,struct wake_q_head * wake_q) __rt_mutex_start_proxy_lock() argument
360 rt_mutex_start_proxy_lock(struct rt_mutex_base * lock,struct rt_mutex_waiter * waiter,struct task_struct * task) rt_mutex_start_proxy_lock() argument
397 rt_mutex_wait_proxy_lock(struct rt_mutex_base * lock,struct hrtimer_sleeper * to,struct rt_mutex_waiter * waiter) rt_mutex_wait_proxy_lock() argument
436 rt_mutex_cleanup_proxy_lock(struct rt_mutex_base * lock,struct rt_mutex_waiter * waiter) rt_mutex_cleanup_proxy_lock() argument
479 struct rt_mutex_waiter *waiter; rt_mutex_adjust_pi() local
[all...]
H A Dww_mutex.h80 __ww_waiter_add(struct mutex *lock, struct mutex_waiter *waiter, struct mutex_waiter *pos) in __ww_waiter_add() argument
83 __mutex_add_waiter(lock, waiter, pos); in __ww_waiter_add()
161 __ww_waiter_add(struct rt_mutex *lock, struct rt_mutex_waiter *waiter, struct rt_mutex_waiter *pos) in __ww_waiter_add() argument
163 /* RT unconditionally adds the waiter first and then removes it on error */ in __ww_waiter_add()
267 * so the wait_list ordering will go wobbly. rt_mutex re-queues the waiter and in __ww_ctx_less()
304 * Wait-Die; wake a lesser waiter context (when locks held) such that it can
312 __ww_mutex_die(struct MUTEX *lock, struct MUTEX_WAITER *waiter, in __ww_mutex_die() argument
318 if (waiter->ww_ctx->acquired > 0 && __ww_ctx_less(waiter->ww_ctx, ww_ctx)) { in __ww_mutex_die()
320 debug_mutex_wake_waiter(lock, waiter); in __ww_mutex_die()
504 __ww_mutex_check_kill(struct MUTEX * lock,struct MUTEX_WAITER * waiter,struct ww_acquire_ctx * ctx) __ww_mutex_check_kill() argument
553 __ww_mutex_add_waiter(struct MUTEX_WAITER * waiter,struct MUTEX * lock,struct ww_acquire_ctx * ww_ctx,struct wake_q_head * wake_q) __ww_mutex_add_waiter() argument
[all...]
/linux/drivers/md/dm-vdo/
H A Dadmin-state.c206 if (state->waiter != NULL) in vdo_finish_operation()
207 vdo_set_completion_result(state->waiter, result); in vdo_finish_operation()
211 if (state->waiter != NULL) in vdo_finish_operation()
212 vdo_launch_completion(vdo_forget(state->waiter)); in vdo_finish_operation()
229 struct vdo_completion *waiter, in begin_operation() argument
240 } else if (state->waiter != NULL) { in begin_operation()
245 state->waiter = waiter; in begin_operation()
259 if (waiter != NULL) in begin_operation()
260 vdo_continue_completion(waiter, result); in begin_operation()
276 struct vdo_completion *waiter, in start_operation() argument
[all …]
H A Dwait-queue.c21 void vdo_waitq_enqueue_waiter(struct vdo_wait_queue *waitq, struct vdo_waiter *waiter) in vdo_waitq_enqueue_waiter() argument
23 BUG_ON(waiter->next_waiter != NULL); in vdo_waitq_enqueue_waiter()
30 waiter->next_waiter = waiter; in vdo_waitq_enqueue_waiter()
33 waiter->next_waiter = waitq->last_waiter->next_waiter; in vdo_waitq_enqueue_waiter()
34 waitq->last_waiter->next_waiter = waiter; in vdo_waitq_enqueue_waiter()
38 waitq->last_waiter = waiter; in vdo_waitq_enqueue_waiter()
138 struct vdo_waiter *waiter = vdo_waitq_dequeue_waiter(&iteration_waitq); in vdo_waitq_dequeue_matching_waiters() local
140 vdo_waitq_enqueue_waiter((waiter_match(waiter, match_context) ? in vdo_waitq_dequeue_matching_waiters()
141 matched_waitq : waitq), waiter); in vdo_waitq_dequeue_matching_waiters()
195 struct vdo_waiter *waiter = vdo_waitq_dequeue_waiter(waitq); in vdo_waitq_notify_next_waiter() local
[all …]
H A Dwait-queue.h51 typedef void (*vdo_waiter_callback_fn)(struct vdo_waiter *waiter, void *context);
58 typedef bool (*vdo_waiter_match_fn)(struct vdo_waiter *waiter, void *context);
78 static inline bool vdo_waiter_is_waiting(struct vdo_waiter *waiter) in vdo_waiter_is_waiting() argument
80 return (waiter->next_waiter != NULL); in vdo_waiter_is_waiting()
107 struct vdo_waiter *waiter);
H A Ddump.c154 struct vdo_waiter *waiter, *first = vdo_waitq_get_first_waiter(waitq); in dump_vio_waiters() local
166 for (waiter = first->next_waiter; waiter != first; waiter = waiter->next_waiter) { in dump_vio_waiters()
167 data_vio = vdo_waiter_as_data_vio(waiter); in dump_vio_waiters()
195 if (data_vio->waiter.next_waiter != NULL) in encode_vio_dump_flags()
H A Dadmin-state.h57 struct vdo_completion *waiter; member
140 struct vdo_completion *waiter);
144 struct vdo_completion *waiter, vdo_admin_initiator_fn initiator);
152 struct vdo_completion *waiter, vdo_admin_initiator_fn initiator);
162 struct vdo_completion *waiter, vdo_admin_initiator_fn initiator);
173 struct vdo_completion *waiter,
H A Dflush.h21 struct vdo_waiter waiter; member
/linux/lib/
H A Dklist.c185 struct klist_waiter *waiter, *tmp; in klist_release() local
191 list_for_each_entry_safe(waiter, tmp, &klist_remove_waiters, list) { in klist_release()
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()
[all …]
/linux/tools/testing/selftests/futex/functional/
H A Dfutex_wait.c43 pthread_t waiter; in TEST() local
50 if (pthread_create(&waiter, NULL, waiterfn, (void *) &flags)) in TEST()
68 pthread_t waiter; in TEST() local
86 if (pthread_create(&waiter, NULL, waiterfn, NULL)) in TEST()
106 pthread_t waiter; in TEST() local
127 if (pthread_create(&waiter, NULL, waiterfn, NULL)) in TEST()
H A Dfutex_requeue_pi_signal_restart.c102 pthread_t waiter; in TEST() local
113 res = create_rt_thread(&waiter, waiterfn, NULL, SCHED_FIFO, 1); in TEST()
129 pthread_kill(waiter, SIGUSR1); in TEST()
158 pthread_kill(waiter, SIGUSR1); in TEST()
160 pthread_join(waiter, NULL); in TEST()
H A Dfutex_requeue.c27 printf("waiter failed errno %d\n", errno); in waiterfn()
36 pthread_t waiter[10]; in TEST() local
41 * Requeue a waiter from f1 to f2, and wake f2. in TEST()
43 ASSERT_EQ(0, pthread_create(&waiter[0], NULL, waiterfn, NULL)); in TEST()
55 pthread_t waiter[10]; in TEST()
65 ASSERT_EQ(0, pthread_create(&waiter[i], NULL, waiterfn, NULL)); in TEST()
71 pthread_t waiter[10]; TEST() local
H A Dfutex_waitv.c53 pthread_t waiter; in TEST() local
64 if (pthread_create(&waiter, NULL, waiterfn, NULL)) in TEST()
81 pthread_t waiter; in TEST() local
104 if (pthread_create(&waiter, NULL, waiterfn, NULL)) in TEST()
H A Dfutex_requeue_pi.c323 pthread_t waiter[THREAD_MAX], waker, blocker; in TEST_F() local
365 if (create_rt_thread(&waiter[i], waiterfn, (void *)&args[i], in TEST_F()
380 pthread_join(waiter[i], in TEST_F()
/linux/tools/testing/selftests/filesystems/epoll/
H A Depoll_wakeup_test.c23 pthread_t waiter; member
47 pthread_kill(ctx->waiter, SIGUSR1); in kill_timeout()
489 ASSERT_EQ(pthread_create(&ctx.waiter, NULL, waiter_entry1a, &ctx), 0); in TEST()
495 ASSERT_EQ(pthread_join(ctx.waiter, NULL), 0); in TEST()
532 ASSERT_EQ(pthread_create(&ctx.waiter, NULL, waiter_entry1a, &ctx), 0); in TEST()
538 ASSERT_EQ(pthread_join(ctx.waiter, NULL), 0); in TEST()
579 ASSERT_EQ(pthread_create(&ctx.waiter, NULL, waiter_entry2a, &ctx), 0); in TEST()
585 ASSERT_EQ(pthread_join(ctx.waiter, NULL), 0); in TEST()
628 ASSERT_EQ(pthread_create(&ctx.waiter, NULL, waiter_entry1a, &ctx), 0); in TEST()
634 ASSERT_EQ(pthread_join(ctx.waiter, NUL in TEST()
3461 pthread_t waiter[2]; TEST() local
[all...]
/linux/Documentation/locking/
H A Dfutex-requeue-pi.rst20 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.
H A Drt-mutex-design.rst100 waiter
101 - A waiter is a struct that is stored on the stack of a blocked
102 process. Since the scope of the waiter is within the code for
104 the waiter on the process's stack (local variable). This
110 waiter is sometimes used in reference to the task that is waiting
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.
377 by the task, so we only need to compare the priority of that top pi waiter
[all …]
H A Drt-mutex.rst20 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/drivers/platform/raspberrypi/vchiq-interface/
H A Dvchiq_arm.c385 struct bulk_waiter_node *waiter, *next; in free_bulk_waiter() local
387 list_for_each_entry_safe(waiter, next, in free_bulk_waiter()
389 list_del(&waiter->list); in free_bulk_waiter()
392 waiter, waiter->pid); in free_bulk_waiter()
393 kfree(waiter); in free_bulk_waiter()
584 struct bulk_waiter_node *waiter = NULL, *iter; in vchiq_blocking_bulk_transfer() local
597 waiter = iter; in vchiq_blocking_bulk_transfer()
603 if (waiter) { in vchiq_blocking_bulk_transfer()
604 struct vchiq_bulk *bulk = waiter->bulk_waiter.bulk; in vchiq_blocking_bulk_transfer()
616 bulk->waiter = NULL; in vchiq_blocking_bulk_transfer()
[all …]
H A Dvchiq_dev.c291 struct bulk_waiter_node *waiter = NULL, *iter; in vchiq_irq_queue_bulk_tx_rx() local
301 waiter = kzalloc_obj(*waiter); in vchiq_irq_queue_bulk_tx_rx()
302 if (!waiter) { in vchiq_irq_queue_bulk_tx_rx()
311 bulk_params.waiter = &waiter->bulk_waiter; in vchiq_irq_queue_bulk_tx_rx()
321 waiter = iter; in vchiq_irq_queue_bulk_tx_rx()
326 if (!waiter) { in vchiq_irq_queue_bulk_tx_rx()
333 waiter, current->pid); in vchiq_irq_queue_bulk_tx_rx()
336 &waiter->bulk_waiter); in vchiq_irq_queue_bulk_tx_rx()
348 if (!waiter) { in vchiq_irq_queue_bulk_tx_rx()
354 !waiter->bulk_waiter.bulk) { in vchiq_irq_queue_bulk_tx_rx()
[all …]
/linux/drivers/md/persistent-data/
H A Ddm-block-manager.c55 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/fs/iomap/
H A Ddirect-io.c44 struct task_struct *waiter; member
192 struct task_struct *waiter = dio->submit.waiter; in iomap_dio_done() local
194 WRITE_ONCE(dio->submit.waiter, NULL); in iomap_dio_done()
195 blk_wake_io_task(waiter); in iomap_dio_done()
715 dio->submit.waiter = current; in __iomap_dio_rw()
873 if (!READ_ONCE(dio->submit.waiter)) in __iomap_dio_rw()
/linux/block/
H A Dfops.c121 struct task_struct *waiter; member
160 struct task_struct *waiter = dio->waiter; in blkdev_bio_end_io() local
162 WRITE_ONCE(dio->waiter, NULL); in blkdev_bio_end_io()
163 blk_wake_io_task(waiter); in blkdev_bio_end_io()
199 dio->waiter = current; in __blkdev_direct_IO()
271 if (!READ_ONCE(dio->waiter)) in __blkdev_direct_IO()

12