aboutsummaryrefslogtreecommitdiff
path: root/src/kapi/system.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kapi/system.cpp')
-rw-r--r--src/kapi/system.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/kapi/system.cpp b/src/kapi/system.cpp
new file mode 100644
index 0000000..3ae3f29
--- /dev/null
+++ b/src/kapi/system.cpp
@@ -0,0 +1,20 @@
+#include "kapi/system.hpp"
+
+#include "kapi/cio.hpp"
+#include "kapi/cpu.hpp"
+
+namespace teachos::system
+{
+
+ [[gnu::weak]]
+ auto panic(std::string_view message, std::source_location location) -> void
+ {
+ cio::println_error("!!!Kernel Panic!!! ");
+ cio::println_error(message);
+ cio::println_error(location.file_name());
+ cio::println_error(location.function_name());
+
+ cpu::halt();
+ }
+
+} // namespace teachos::system