summaryrefslogtreecommitdiff
path: root/kernel/lib/stack.c
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-04-29 18:00:20 +0200
committerAnton Kling <anton@kling.gg>2024-04-29 18:00:20 +0200
commit7d2ab3a71f4bda9d8ee997764d98b29e13a902c5 (patch)
tree6dcdc7a674a8047a2dba3e95d3be91b4e3161bd5 /kernel/lib/stack.c
parentd60fa1fc01e600c4a163bbe82fab3f1986cb1476 (diff)
Kernel/Socket: Move sockets back to being file descriptors
Diffstat (limited to 'kernel/lib/stack.c')
-rw-r--r--kernel/lib/stack.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/lib/stack.c b/kernel/lib/stack.c
index 7283b35..7c44193 100644
--- a/kernel/lib/stack.c
+++ b/kernel/lib/stack.c
@@ -7,6 +7,10 @@ void stack_init(struct stack *s) {
s->head = NULL;
}
+int stack_isempty(const struct stack *s) {
+ return (NULL == s->head);
+}
+
// 1 = Success
// 0 = Failure
int stack_push(struct stack *s, void *data) {