summaryrefslogtreecommitdiffstats
path: root/polyp/queue.h
diff options
context:
space:
mode:
Diffstat (limited to 'polyp/queue.h')
-rw-r--r--polyp/queue.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/polyp/queue.h b/polyp/queue.h
index 0b72f37d..a739ab74 100644
--- a/polyp/queue.h
+++ b/polyp/queue.h
@@ -24,8 +24,14 @@
struct pa_queue;
+/* A simple implementation of the abstract data type queue. Stores
+ * pointers as members. The memory has to be managed by the caller. */
+
struct pa_queue* pa_queue_new(void);
+
+/* Free the queue and run the specified callback function for every remaining entry. The callback function may be NULL. */
void pa_queue_free(struct pa_queue* q, void (*destroy)(void *p, void *userdata), void *userdata);
+
void pa_queue_push(struct pa_queue *q, void *p);
void* pa_queue_pop(struct pa_queue *q);