summaryrefslogtreecommitdiff
path: root/kernel/list.c
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-04-03 12:31:21 -0400
committerFreya Murphy <freya@freyacat.org>2025-04-03 12:31:21 -0400
commita524eb3846aac4d1b38f08cba49ff3503107042f (patch)
treedbe81fccf975f646a681e4fdcebd227cdfb98774 /kernel/list.c
parentnew libs (diff)
downloadcomus-a524eb3846aac4d1b38f08cba49ff3503107042f.tar.gz
comus-a524eb3846aac4d1b38f08cba49ff3503107042f.tar.bz2
comus-a524eb3846aac4d1b38f08cba49ff3503107042f.zip
move old kernel code (for now) into kernel/old, trying to get long mode
Diffstat (limited to 'kernel/list.c')
-rw-r--r--kernel/list.c63
1 files changed, 0 insertions, 63 deletions
diff --git a/kernel/list.c b/kernel/list.c
deleted file mode 100644
index 5492615..0000000
--- a/kernel/list.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
-** @file list.c
-**
-** @author Warren R. Carithers
-**
-** @brief Support for a basic linked list data type.
-**
-** This module provides a very basic linked list data structure.
-** A list can contain anything that has a pointer field in the first
-** four bytes; these routines assume those bytes contain a pointer to
-** the following entry in the list, whatever that may be.
-*/
-
-#define KERNEL_SRC
-
-#include <common.h>
-
-#include <list.h>
-
-/*
-** FUNCTIONS
-*/
-
-/**
-** Name: list_add
-**
-** Add the supplied data to the beginning of the specified list.
-**
-** @param[in,out] list The address of a list_t variable
-** @param[in] data The data to prepend to the list
-*/
-void list_add(list_t *list, void *data)
-{
- // sanity checks
- assert1(list != NULL);
- assert1(data != NULL);
-
- list_t *tmp = (list_t *)data;
- tmp->next = list->next;
- list->next = tmp;
-}
-
-/**
-** Name: list_remove
-**
-** Remove the first entry from a linked list.
-**
-** @param[in,out] list The address of a list_t variable
-**
-** @return a pointer to the removed data, or NULL if the list was empty
-*/
-void *list_remove(list_t *list)
-{
- assert1(list != NULL);
-
- list_t *data = list->next;
- if (data != NULL) {
- list->next = data->next;
- data->next = NULL;
- }
-
- return (void *)data;
-}