summaryrefslogtreecommitdiff
path: root/src/user/knob/panic.c
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2021-01-24 12:00:11 -0500
committerBenji Dial <benji6283@gmail.com>2021-01-24 12:00:11 -0500
commitbce944d1498eaa3b6940ee234c863b3548a66b37 (patch)
treeea40c087ab4f0f236aee8d158cf68550f5209f72 /src/user/knob/panic.c
parentca731aa747214919df7b3dfe3478dbe787ce5b68 (diff)
downloadportland-os-bce944d1498eaa3b6940ee234c863b3548a66b37.tar.gz
graphics!
Diffstat (limited to 'src/user/knob/panic.c')
-rw-r--r--src/user/knob/panic.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/user/knob/panic.c b/src/user/knob/panic.c
new file mode 100644
index 0000000..1ff663c
--- /dev/null
+++ b/src/user/knob/panic.c
@@ -0,0 +1,12 @@
+#include <knob/format.h>
+
+#include <pland/syscall.h>
+#include <pland/pcrt.h>
+
+#include <stdint.h>
+
+__attribute__ ((noreturn))
+void panic(const char *filename, uint32_t line, const char *message) {
+ _system_log(format("panic in %s on line %u: %s", filename, line, message));
+ __pcrt_quit();
+} \ No newline at end of file