Lines Matching refs:queue

15 	struct funnel_queue *queue;  in vdo_make_funnel_queue()  local
17 result = vdo_allocate(1, struct funnel_queue, "funnel queue", &queue); in vdo_make_funnel_queue()
25 queue->stub.next = NULL; in vdo_make_funnel_queue()
26 queue->newest = &queue->stub; in vdo_make_funnel_queue()
27 queue->oldest = &queue->stub; in vdo_make_funnel_queue()
29 *queue_ptr = queue; in vdo_make_funnel_queue()
33 void vdo_free_funnel_queue(struct funnel_queue *queue) in vdo_free_funnel_queue() argument
35 vdo_free(queue); in vdo_free_funnel_queue()
38 static struct funnel_queue_entry *get_oldest(struct funnel_queue *queue) in get_oldest() argument
45 struct funnel_queue_entry *oldest = queue->oldest; in get_oldest()
48 if (oldest == &queue->stub) { in get_oldest()
60 queue->oldest = oldest; in get_oldest()
69 struct funnel_queue_entry *newest = READ_ONCE(queue->newest); in get_oldest()
83 vdo_funnel_queue_put(queue, &queue->stub); in get_oldest()
103 struct funnel_queue_entry *vdo_funnel_queue_poll(struct funnel_queue *queue) in vdo_funnel_queue_poll() argument
105 struct funnel_queue_entry *oldest = get_oldest(queue); in vdo_funnel_queue_poll()
116 queue->oldest = READ_ONCE(oldest->next); in vdo_funnel_queue_poll()
127 uds_prefetch_address(queue->oldest, true); in vdo_funnel_queue_poll()
137 bool vdo_is_funnel_queue_empty(struct funnel_queue *queue) in vdo_is_funnel_queue_empty() argument
139 return get_oldest(queue) == NULL; in vdo_is_funnel_queue_empty()
148 bool vdo_is_funnel_queue_idle(struct funnel_queue *queue) in vdo_is_funnel_queue_idle() argument
154 if (queue->oldest != &queue->stub) in vdo_is_funnel_queue_idle()
166 if (READ_ONCE(queue->newest) != &queue->stub) in vdo_is_funnel_queue_idle()