aboutsummaryrefslogtreecommitdiff
path: root/include/lib
diff options
context:
space:
mode:
Diffstat (limited to 'include/lib')
-rw-r--r--include/lib/ll.h4
-rw-r--r--include/lib/q.h5
2 files changed, 6 insertions, 3 deletions
diff --git a/include/lib/ll.h b/include/lib/ll.h
index ab4148d..a9c3722 100644
--- a/include/lib/ll.h
+++ b/include/lib/ll.h
@@ -5,11 +5,13 @@ struct LL {
struct LL* prev;
struct LL* next;
void* data;
-};
+} __attribute__((packed));
struct LL* new_ll(void* val);
void push_ll(struct LL* l, void* val);
+void pop_ll(struct LL* l);
void remove_ll(struct LL* l, unsigned long idx);
+unsigned long length_ll(struct LL* l);
#define show_ll(L, TYPE) { \
struct LL* t = L; \
diff --git a/include/lib/q.h b/include/lib/q.h
index cf75c6d..11d7ab7 100644
--- a/include/lib/q.h
+++ b/include/lib/q.h
@@ -4,16 +4,17 @@
struct Q_base {
struct Q* next;
struct Q* last;
-};
+} __attribute__((packed));
struct Q {
struct Q* next;
void* data;
-};
+} __attribute__((packed));
struct Q_base* new_q();
void push_q(struct Q_base* qb, void* val);
void pop_q(struct Q_base* qb);
+unsigned long length_q(struct Q_base* qb);
#define show_q(QQ, TYPE) { \
if (QQ->next != 0) { \