C Everything
This is a C repository containing a curated set of generic data structures and algorithm.
|
Contains definitions of routines supported by queue. More...
#include "queue.h"
Go to the source code of this file.
Functions | |
void | queue_enqueue_ll (t_gen d, t_gen data) |
add element in queue More... | |
t_gen | queue_dequeue_ll (t_gen d) |
pop front element in queue More... | |
void | queue_enqueue_arr (t_gen d, t_gen data) |
add element in queue More... | |
t_gen | queue_dequeue_arr (t_gen d) |
pop front element in queue More... | |
t_gen | queue_peek (t_gen d, int idx) |
peek front element in queue More... | |
bool | queue_full (t_gen d) |
Check queue full More... | |
bool | queue_empty (t_gen d) |
Check queue empty More... | |
int | queue_size (t_gen d) |
Return queue size More... | |
void | queue_print (t_gen d) |
queue_print_info More... | |
void | destroy_queue (t_gen d) |
Destroy queue instance More... | |
t_gen | create_queue (char *name, int max_size, e_queuetype qtype, t_dparams *prm) |
Destroy queue instance More... | |
Variables | |
f_ins | q_enq [] = {queue_enqueue_ll, queue_enqueue_arr} |
Look Up function ptrs to enq elems to queue. More... | |
f_gen | q_deq [] = {queue_dequeue_ll, queue_dequeue_arr} |
Look Up function ptrs to deq elems to queue. More... | |
Contains definitions of routines supported by queue.
Definition in file queue.c.
t_gen create_queue | ( | char * | name, |
int | max_size, | ||
e_queuetype | qtype, | ||
t_dparams * | prm | ||
) |
void destroy_queue | ( | t_gen | d | ) |
bool queue_empty | ( | t_gen | d | ) |
bool queue_full | ( | t_gen | d | ) |
void queue_print | ( | t_gen | d | ) |
int queue_size | ( | t_gen | d | ) |
f_gen q_deq[] = {queue_dequeue_ll, queue_dequeue_arr} |
f_ins q_enq[] = {queue_enqueue_ll, queue_enqueue_arr} |