aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/std/abort.c
diff options
context:
space:
mode:
authorEmulatedSeasons <89668582+EmulatedSeasons@users.noreply.github.com>2023-06-15 22:36:39 -0400
committerEmulatedSeasons <89668582+EmulatedSeasons@users.noreply.github.com>2023-06-15 22:36:39 -0400
commita78033acc941fc4bcf6188f1d48fd8e012673fff (patch)
treeac92adae5e40274fd9e0b78352a24840cc88eab4 /kernel/std/abort.c
initial commit
Diffstat (limited to 'kernel/std/abort.c')
-rw-r--r--kernel/std/abort.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/std/abort.c b/kernel/std/abort.c
new file mode 100644
index 0000000..83873e8
--- /dev/null
+++ b/kernel/std/abort.c
@@ -0,0 +1,11 @@
+#include <stdio.h>
+#include <stdlib.h>
+
+__attribute__((__noreturn__))
+void abort(void) {
+ // TODO: Add proper kernel panic.
+ printf("kernel: panic: abort()\n");
+ asm volatile("hlt");
+ while (1) { }
+ __builtin_unreachable();
+} \ No newline at end of file