Go to the documentation of this file.
19 #ifndef PRIORITY_QUEUE_H
20 #define PRIORITY_QUEUE_H
48 #define PRIORITY_QUEUE_NODE_INIT { NULL, 0, 0 }
69 #define PRIORITY_QUEUE_INIT { NULL }
unsigned int data
queue node data
void priority_queue_print_node(priority_queue_t *root)
print the data, priority, and successor of a given node
priority_queue_node_t * priority_queue_remove_head(priority_queue_t *root)
remove the priority queue's head
uint32_t priority
queue node priority
struct priority_queue_node * next
next queue node
static void priority_queue_init(priority_queue_t *priority_queue)
Initialize a priority queue object.
priority_queue_node_t * first
first queue node
void priority_queue_print(priority_queue_t *root)
print the data and priority of every node in the given priority queue
#define PRIORITY_QUEUE_NODE_INIT
Static initializer for priority_queue_node_t.
void priority_queue_remove(priority_queue_t *root, priority_queue_node_t *node)
remove node from root
data type for priority queue nodes
struct priority_queue_node priority_queue_node_t
data type for priority queue nodes
void priority_queue_add(priority_queue_t *root, priority_queue_node_t *new_obj)
insert new_obj into root based on its priority
static void priority_queue_node_init(priority_queue_node_t *priority_queue_node)
Initialize a priority queue node object.
#define PRIORITY_QUEUE_INIT
Static initializer for priority_queue_t.
data type for priority queues