summaryrefslogtreecommitdiff
path: root/src/kernel/panic.h
diff options
context:
space:
mode:
authordzwdz2021-07-10 19:36:50 +0200
committerdzwdz2021-07-10 19:36:50 +0200
commita90f613e50b1677b03d19793039e0769a09caf9f (patch)
tree21b10fb5f924d383d13e711b23f2c0b5181feabf /src/kernel/panic.h
parente1a46050ac834b0d1a125847a117edb56d53f32a (diff)
abstract away logging
Now, the kernel only interfaces with the architecture dependent stuff via functions declared in generic.h. I'll write a linter enforcing this soon.
Diffstat (limited to 'src/kernel/panic.h')
-rw-r--r--src/kernel/panic.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/kernel/panic.h b/src/kernel/panic.h
index 54a0b8b..12d26fd 100644
--- a/src/kernel/panic.h
+++ b/src/kernel/panic.h
@@ -1,14 +1,13 @@
#pragma once
#include <arch/generic.h>
-#include <arch/i386/tty.h> // TODO abstract away
// dumb c shit
#define panic_tostr2(x) #x
#define panic_tostr(x) panic_tostr2(x)
#define panic() do { \
- tty_const(" PANIC! at the "); \
- tty_const(__func__); \
- tty_const(" (" __FILE__ ":" panic_tostr(__LINE__) ") "); \
+ log_const(" PANIC! at the "); \
+ log_const(__func__); \
+ log_const(" (" __FILE__ ":" panic_tostr(__LINE__) ") "); \
halt_cpu(); \
} while (0)