prevent some compiler warnings
[poe-xs-queue-array.git] / queue.h
CommitLineData
a0e4f61f
TC
1#ifndef XSQUEUE_H\r
2#define XSQUEUE_H\r
3\r
4typedef unsigned pq_id_t;\r
5typedef double pq_priority_t;\r
6\r
7/* an entry in the queue */\r
8typedef struct {\r
9 pq_priority_t priority;\r
10 pq_id_t id;\r
11 SV *payload;\r
12} pq_entry;\r
13\r
14typedef struct poe_queue_tag poe_queue;\r
15\r
16extern poe_queue *pq_create(void);\r
17extern void\r
18pq_delete(poe_queue *pq);\r
19extern int\r
20pq_enqueue(poe_queue *pq, pq_priority_t priority, SV *payload);\r
21extern int\r
22pq_get_item_count(poe_queue *pq);\r
23extern int\r
24pq_dequeue_next(poe_queue *pq, pq_priority_t *priority, pq_id_t *id, SV **payload);\r
25extern int\r
26pq_get_next_priority(poe_queue *pq, pq_priority_t *priority);\r
27extern int\r
28pq_remove_item(poe_queue *pq, pq_id_t id, SV *filter, pq_entry *removed);\r
29extern int\r
30pq_remove_items(poe_queue *pq, SV *filter, int max_count, pq_entry **entries);\r
31extern int\r
32pq_set_priority(poe_queue *pq, pq_id_t id, SV *filter, pq_priority_t new_priority);\r
33extern int\r
34pq_adjust_priority(poe_queue *pq, pq_id_t id, SV *filter, double delta, pq_priority_t *priority);\r
35extern int\r
36pq_peek_items(poe_queue *pq, SV *filter, int max_count, pq_entry **items);\r
37extern void pq_dump(poe_queue *pq);\r
d5e34ea9 38extern void pq_verify(poe_queue *pq);\r
a0e4f61f
TC
39\r
40#endif\r