Lines Matching full:queue
32 #include "qemu/queue.h"
36 void qemu_co_queue_init(CoQueue *queue) in qemu_co_queue_init() argument
38 QSIMPLEQ_INIT(&queue->entries); in qemu_co_queue_init()
41 void coroutine_fn qemu_co_queue_wait_impl(CoQueue *queue, QemuLockable *lock, in qemu_co_queue_wait_impl() argument
46 QSIMPLEQ_INSERT_HEAD(&queue->entries, self, co_queue_next); in qemu_co_queue_wait_impl()
48 QSIMPLEQ_INSERT_TAIL(&queue->entries, self, co_queue_next); in qemu_co_queue_wait_impl()
65 * mutex's queue. This avoids the thundering herd effect. in qemu_co_queue_wait_impl()
74 bool qemu_co_enter_next_impl(CoQueue *queue, QemuLockable *lock) in qemu_co_enter_next_impl() argument
78 next = QSIMPLEQ_FIRST(&queue->entries); in qemu_co_enter_next_impl()
83 QSIMPLEQ_REMOVE_HEAD(&queue->entries, co_queue_next); in qemu_co_enter_next_impl()
94 bool coroutine_fn qemu_co_queue_next(CoQueue *queue) in qemu_co_queue_next() argument
97 return qemu_co_enter_next_impl(queue, NULL); in qemu_co_queue_next()
100 void qemu_co_enter_all_impl(CoQueue *queue, QemuLockable *lock) in qemu_co_enter_all_impl() argument
102 while (qemu_co_enter_next_impl(queue, lock)) { in qemu_co_enter_all_impl()
107 void coroutine_fn qemu_co_queue_restart_all(CoQueue *queue) in qemu_co_queue_restart_all() argument
110 qemu_co_enter_all_impl(queue, NULL); in qemu_co_queue_restart_all()
113 bool qemu_co_queue_empty(CoQueue *queue) in qemu_co_queue_empty() argument
115 return QSIMPLEQ_FIRST(&queue->entries) == NULL; in qemu_co_queue_empty()
119 * lock-free queue. There cannot be two concurrent pop_waiter() calls
135 * The following functions manage this queue.
305 * queue. Pick a sequence number for the handoff protocol (not 0). in qemu_co_mutex_unlock()