diff options
Diffstat (limited to 'kernel/lib/stack.c')
-rw-r--r-- | kernel/lib/stack.c | 4 |
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) { |