aboutsummaryrefslogtreecommitdiffstats
path: root/src/misc/queue.h
blob: 651d4b0eadcbbc095f2b8089a128648625389508 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef GQUEUE_H
#define GQUEUE_H GQUEUE_H
#include<stdlib.h>


struct Queue_Node
{
	void *data;
	struct Queue_Node *prev;
};

struct Queue
{
	struct Queue_Node *first,*last;	
	size_t size;
	
};

void Queue_Init(struct Queue *q);
void Queue_Push(struct Queue *q,void *data);
void* Queue_Pop(struct Queue *q);
void Queue_Destroy(struct Queue *q);
#endif