aboutsummaryrefslogtreecommitdiff
path: root/include/linked_list.h
diff options
context:
space:
mode:
authorKenny Levinsen <kl@kl.wtf>2020-08-03 02:11:29 +0200
committerKenny Levinsen <kl@kl.wtf>2020-08-03 02:13:47 +0200
commit4afe674e54a1df7a86d3094d664cc2d1928f3662 (patch)
treecc820d6d0a2a04d7468df0dc737ab8c0646615b9 /include/linked_list.h
parentc35b2d2d8848957c1761fe107352fd989c3915f4 (diff)
linked_list: Initial implementation
Diffstat (limited to 'include/linked_list.h')
-rw-r--r--include/linked_list.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linked_list.h b/include/linked_list.h
new file mode 100644
index 0000000..47cf09b
--- /dev/null
+++ b/include/linked_list.h
@@ -0,0 +1,16 @@
+#ifndef _LINKED_LIST_H
+#define _LINKED_LIST_H
+
+#include <stdbool.h>
+
+struct linked_list {
+ struct linked_list *prev;
+ struct linked_list *next;
+};
+
+void linked_list_init(struct linked_list *list);
+void linked_list_insert(struct linked_list *list, struct linked_list *elem);
+void linked_list_remove(struct linked_list *elem);
+bool linked_list_empty(struct linked_list *list);
+
+#endif