41 #ifndef MERCURY_QUEUE_H
42 #define MERCURY_QUEUE_H
44 #include "mercury_util_config.h"
66 #define HG_QUEUE_NULL ((void *) 0)
105 HG_UTIL_EXPORT hg_queue_value_t
116 HG_UTIL_EXPORT hg_queue_value_t
138 HG_UTIL_EXPORT hg_queue_value_t
149 HG_UTIL_EXPORT hg_queue_value_t
void * hg_queue_value_t
A value stored in a hg_queue_t.
HG_UTIL_EXPORT hg_queue_value_t hg_queue_pop_head(hg_queue_t *queue)
Remove a value from the head of a queue.
HG_UTIL_EXPORT int hg_queue_push_head(hg_queue_t *queue, hg_queue_value_t data)
Add a value to the head of a queue.
HG_UTIL_EXPORT hg_queue_value_t hg_queue_peek_tail(hg_queue_t *queue)
Read a value from the tail of a queue, without removing it from the queue.
HG_UTIL_EXPORT int hg_queue_push_tail(hg_queue_t *queue, hg_queue_value_t data)
Add a value to the tail of a queue.
HG_UTIL_EXPORT hg_queue_value_t hg_queue_pop_tail(hg_queue_t *queue)
Remove a value from the tail of a queue.
HG_UTIL_EXPORT hg_queue_t * hg_queue_new(void)
Create a new double-ended queue.
HG_UTIL_EXPORT hg_queue_value_t hg_queue_peek_head(hg_queue_t *queue)
Read value from the head of a queue, without removing it from the queue.
struct hg_queue hg_queue_t
A double-ended queue.
HG_UTIL_EXPORT int hg_queue_is_empty(hg_queue_t *queue)
Query if any values are currently in a queue.
HG_UTIL_EXPORT void hg_queue_free(hg_queue_t *queue)
Destroy a queue.