aboutsummaryrefslogtreecommitdiffstats
path: root/inc/queue.h
blob: 2955e34e0eb75288ecae787e2b36b73d759bc5e4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef    __QUEUE_H__
#define    __QUEUE_H__

#include "utility.h"

pvoid  ctl_queue_initX(ppvoid q, uint size);
pvoid  ctl_queue_freeX(ppvoid q);

uint   ctl_queue_getEntrySizeX(ppcvoid q);
int    ctl_queue_isEmptyX     (ppcvoid q);

pvoid  ctl_queue_getX         ( ppvoid q);

pvoid  ctl_queue_addX(ppvoid q, pcvoid data);
int    ctl_queue_delX(ppvoid q);

pvoid  ctl_queue_copyX(ppcvoid q, ppvoid q2);

#define ctl_queue_init(X,Y) ctl_queue_initX(ppVoid(X),Y)
#define ctl_queue_free(X)   ctl_queue_freeX(ppVoid(X))

#define ctl_queue_getEntrySize(X) ctl_queue_getEntrySizeX(ppcVoid(X))
#define ctl_queue_isEmpty(X)      ctl_queue_isEmptyX     (ppcVoid(X))
#define ctl_queue_get(X)          ctl_queue_getX         (ppcVoid(X))

#define ctl_queue_add(X,Y) ctl_queue_addX(ppVoid(X),pcVoid(Y))
#define ctl_queue_del(X)   ctl_queue_delX(ppVoid(X))

#define ctl_queue_copy(X,Y) ctl_queue_copyX(ppcVoid(X),ppVoid(Y))

#endif  /* __QUEUE_H__ */