summaryrefslogtreecommitdiff
path: root/src/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel')
-rw-r--r--src/kernel/main.c8
-rw-r--r--src/kernel/panic.h7
2 files changed, 7 insertions, 8 deletions
diff --git a/src/kernel/main.c b/src/kernel/main.c
index aa67d7c..d2d7dda 100644
--- a/src/kernel/main.c
+++ b/src/kernel/main.c
@@ -6,17 +6,17 @@
void r3_test();
void kmain() {
- tty_const("mem...");
+ log_const("mem...");
mem_init();
- tty_const("creating process...");
+ log_const("creating process...");
struct process *proc = process_new(r3_test);
- tty_const("switching...");
+ log_const("switching...");
process_switch(proc);
}
void r3_test() {
- tty_const("ok");
+ log_const("ok");
asm("cli");
panic();
}
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)