aboutsummaryrefslogtreecommitdiffstats
path: root/inc/queue.h
diff options
context:
space:
mode:
Diffstat (limited to 'inc/queue.h')
-rw-r--r--inc/queue.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/inc/queue.h b/inc/queue.h
new file mode 100644
index 0000000..6799407
--- /dev/null
+++ b/inc/queue.h
@@ -0,0 +1,30 @@
+#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);
+pcvoid ctl_queue_getFrontX (ppcvoid q);
+int ctl_queue_isEmptyX (ppcvoid q);
+
+pcvoid 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_getFront(X) ctl_queue_getFrontX (ppcVoid(X))
+#define ctl_queue_isEmpty(X) ctl_queue_isEmptyX (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__ */