Lines Matching refs:waiter

15  * vdo_waitq_enqueue_waiter() - Add a waiter to the tail end of a waitq.
16 * @waitq: The vdo_wait_queue to which to add the waiter.
17 * @waiter: The waiter to add to the waitq.
19 * The waiter must not already be waiting in a waitq.
21 void vdo_waitq_enqueue_waiter(struct vdo_wait_queue *waitq, struct vdo_waiter *waiter)
23 BUG_ON(waiter->next_waiter != NULL);
28 * initial waiter.
30 waiter->next_waiter = waiter;
32 /* Splice the new waiter in at the end of the waitq. */
33 waiter->next_waiter = waitq->last_waiter->next_waiter;
34 waitq->last_waiter->next_waiter = waiter;
37 /* In both cases, the waiter we added to the ring becomes the last waiter. */
38 waitq->last_waiter = waiter;
75 * @callback: The function to call to notify each waiter, or NULL to invoke the callback field
76 * registered in each waiter.
101 * vdo_waitq_get_first_waiter() - Return the waiter that is at the head end of a waitq.
102 * @waitq: The vdo_wait_queue from which to get the first waiter.
104 * Return: The first (oldest) waiter in the waitq, or NULL if the waitq is empty.
138 struct vdo_waiter *waiter = vdo_waitq_dequeue_waiter(&iteration_waitq);
140 vdo_waitq_enqueue_waiter((waiter_match(waiter, match_context) ?
141 matched_waitq : waitq), waiter);
146 * vdo_waitq_dequeue_waiter() - Remove the first (oldest) waiter from a waitq.
149 * The caller will be responsible for waking the waiter by continuing its
152 * Return: The first (oldest) waiter in the waitq, or NULL if the waitq is empty.
167 * The waitq has multiple waiters, so splice the first waiter out
173 /* The waiter is no longer in a waitq. */
182 * @waitq: The vdo_wait_queue containing the waiter to notify.
183 * @callback: The function to call to notify the waiter, or NULL to invoke the callback field
184 * registered in the waiter.
190 * Return: true if there was a waiter in the waitq.
195 struct vdo_waiter *waiter = vdo_waitq_dequeue_waiter(waitq);
197 if (waiter == NULL)
201 callback = waiter->callback;
202 callback(waiter, context);