From a90f613e50b1677b03d19793039e0769a09caf9f Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sat, 10 Jul 2021 19:36:50 +0200 Subject: 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. --- src/kernel/panic.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/kernel/panic.h') 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 -#include // 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) -- cgit v1.2.3