summaryrefslogtreecommitdiff
path: root/kernel/panic.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/panic.cpp')
-rw-r--r--kernel/panic.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/panic.cpp b/kernel/panic.cpp
new file mode 100644
index 0000000..233fcf4
--- /dev/null
+++ b/kernel/panic.cpp
@@ -0,0 +1,10 @@
+#include <hilbert/kernel/terminal.hpp>
+#include <hilbert/kernel/panic.hpp>
+
+namespace hilbert::kernel {
+ [[noreturn]] void panic(const char *string_sz) {
+ terminal::put_string_sz(string_sz);
+ while (1)
+ asm ("hlt");
+ }
+}