Priority queue API. More...
#include <sys/types.h>
Go to the source code of this file.
Typedefs | |
typedef struct priority_queue | priority_queue_t |
Opaque data type for a priority queue. | |
Functions | |
int | priority_queue_new (priority_queue_t **pq, size_t size) |
Creates a new priority queue. | |
int | priority_queue_free (priority_queue_t *pq) |
Frees a priority queue. | |
int | priority_queue_add (priority_queue_t *pq, void *data, int key, size_t *pos) |
Adds an element to the priority queue. | |
int | priority_queue_remove_max (priority_queue_t *pq, void **data) |
Remove the element with the maximum priority from the priority queue. | |
int | priority_queue_change_key (priority_queue_t *pq, size_t pos, int key) |
Change the priority key of an element. | |
int | priority_queue_get_size (priority_queue_t *pq, size_t *size) |
Gets the size of the priority queue. |
Priority queue API.
Definition in file priority_queue.h.