summaryrefslogtreecommitdiff
path: root/kernel/libc/exit
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-02-21 20:06:35 +0100
committerAnton Kling <anton@kling.gg>2024-02-21 20:06:35 +0100
commit9b475d3db3275d4c34f02161ae70ced5595a0fdb (patch)
tree0c50e4af3ce52017f295c44f6f4319e4a43de085 /kernel/libc/exit
parent6c9cb0bd8ceb039ce387c850e25adc6f99cfcd6f (diff)
Kernel: Remove all inline assembly.
Now the kernel does not rely upon inline assembly which is often very error prone. This also means that the kernel could probably be compiled with any c99 compiler which would help future bootstrapping.
Diffstat (limited to 'kernel/libc/exit')
-rw-r--r--kernel/libc/exit/assert.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/libc/exit/assert.c b/kernel/libc/exit/assert.c
index 3351249..47c0704 100644
--- a/kernel/libc/exit/assert.c
+++ b/kernel/libc/exit/assert.c
@@ -1,12 +1,11 @@
#include <assert.h>
#include <log.h>
#include <stdio.h>
+#include <cpu/arch_inst.h>
__attribute__((__noreturn__)) void aFailed(char *f, int l) {
kprintf("Assert failed\n");
kprintf("%s : %d\n", f, l);
dump_backtrace(10);
- asm("hlt");
- for (;;)
- ;
+ halt();
}