FIFO queue. Should be pretty self-explanatory.
When a queue is not empty, last element's m0_queue_link::ql_next is set to "end-of-queue" marker (EOQ). This guarantees that an element is in a queue iff ql_next is not NULL (see m0_queue_link_is_in()).
When a queue is empty, its head and tail are set to EOQ. This allows iteration over queue elements via loop of the form
independently of whether the queue is empty.
◆ EOQ
◆ m0_queue_contains()
◆ m0_queue_fini()
M0_INTERNAL void m0_queue_fini |
( |
struct m0_queue * |
q | ) |
|
◆ m0_queue_get()
Returns queue head or NULL if queue is empty.
Definition at line 112 of file queue.c.
◆ m0_queue_init()
M0_INTERNAL void m0_queue_init |
( |
struct m0_queue * |
q | ) |
|
◆ m0_queue_invariant()
M0_INTERNAL bool m0_queue_invariant |
( |
const struct m0_queue * |
q | ) |
|
◆ m0_queue_is_empty()
M0_INTERNAL bool m0_queue_is_empty |
( |
const struct m0_queue * |
q | ) |
|
◆ m0_queue_length()
M0_INTERNAL size_t m0_queue_length |
( |
const struct m0_queue * |
q | ) |
|
◆ m0_queue_link_fini()
◆ m0_queue_link_init()
◆ m0_queue_link_is_in()
M0_INTERNAL bool m0_queue_link_is_in |
( |
const struct m0_queue_link * |
ql | ) |
|
◆ m0_queue_put()
◆ M0_QUEUE_INIT [1/2]
Static queue initializer. Assign this to a variable of type struct m0_queue to initialize empty queue.
Definition at line 48 of file queue.c.
◆ M0_QUEUE_INIT [2/2]
Initial value:Static queue initializer. Assign this to a variable of type struct m0_queue to initialize empty queue.
Definition at line 48 of file queue.c.
◆ M0_XCA_DOMAIN