Lines Matching defs:waitq
16 * constant-time enqueue and dequeue operations. A null pointer is an empty waitq.
18 * An empty waitq:
21 * A singleton waitq:
24 * A three-element waitq:
63 * The next waiter in the waitq. If this entry is the last waiter, then this
64 * is actually a pointer back to the head of the waitq.
85 * @waitq: The vdo_wait_queue to initialize.
87 static inline void vdo_waitq_init(struct vdo_wait_queue *waitq)
89 *waitq = (struct vdo_wait_queue) {
97 * @waitq: The vdo_wait_queue to query.
99 * Return: true if there are any waiters in the waitq.
101 static inline bool __must_check vdo_waitq_has_waiters(const struct vdo_wait_queue *waitq)
103 return (waitq->last_waiter != NULL);
106 void vdo_waitq_enqueue_waiter(struct vdo_wait_queue *waitq,
109 struct vdo_waiter *vdo_waitq_dequeue_waiter(struct vdo_wait_queue *waitq);
111 void vdo_waitq_notify_all_waiters(struct vdo_wait_queue *waitq,
114 bool vdo_waitq_notify_next_waiter(struct vdo_wait_queue *waitq,
120 struct vdo_waiter *vdo_waitq_get_first_waiter(const struct vdo_wait_queue *waitq);
122 void vdo_waitq_dequeue_matching_waiters(struct vdo_wait_queue *waitq,
129 * @waitq: The vdo_wait_queue to query.
131 * Return: The number of waiters in the waitq.
133 static inline size_t __must_check vdo_waitq_num_waiters(const struct vdo_wait_queue *waitq)
135 return waitq->length;