From d1ff7bcc91886626dc9060ec5fb67ee102ab7c1d Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Mon, 11 Mar 2024 21:30:31 -0400 Subject: usermode capable kernel with logging syscall --- lib/linkedlist.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 lib/linkedlist.h (limited to 'lib/linkedlist.h') diff --git a/lib/linkedlist.h b/lib/linkedlist.h new file mode 100644 index 0000000..26c148e --- /dev/null +++ b/lib/linkedlist.h @@ -0,0 +1,26 @@ +#ifndef JOVE_LIB_LINKEDLIST_H +#define JOVE_LIB_LINKEDLIST_H 1 + +#include +#include + +struct SLLNode { + struct SLLNode *next; + char data[]; +}; + +/*Singly Linked List*/ +struct SLinkedList +{ + struct SLLNode *head; + struct SLLNode *tail; + + size_t obj_size; + size_t count; +}; + +void sll_new(struct SLinkedList *list, size_t obj_size); +void sll_push(struct SLinkedList *list, void *node); +void *sll_get(struct SLinkedList *list, size_t index); + +#endif -- cgit v1.2.1