C Everything
This is a C repository containing a curated set of generic data structures and algorithm.
queue.h File Reference

Contains declations of queue types, operations and structure. More...

#include "common.h"
#include "link_list.h"

Go to the source code of this file.

Data Structures

struct  t_queue
 queue struct defn More...
 

Enumerations

enum  e_queuetype { eLL_QUEUE_CIRC , eARRAY_QUEUE_CIRC }
 types of queue More...
 

Functions

t_gen create_queue (char *name, int max_size, e_queuetype type, t_dparams *prm)
 
Destroy queue instance More...
 

Detailed Description

Contains declations of queue types, operations and structure.

Definition in file queue.h.

Enumeration Type Documentation

◆ e_queuetype

types of queue

Enumerator
eLL_QUEUE_CIRC 

Link List Based Queue.

eARRAY_QUEUE_CIRC 

Array Based Queue.

Definition at line 11 of file queue.h.

Function Documentation

◆ create_queue()

t_gen create_queue ( char *  name,
int  max_size,
e_queuetype  qtype,
t_dparams prm 
)


Destroy queue instance

Parameters
name- Name of queue instance
max_size- Max size of queue instance
type- Type of queue to be created
prm- Data type specific parameters
Returns
- Pointer to instance of queue

Definition at line 37 of file queue.c.