aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/exceptions.c
blob: 11e45fb849d3b3fb195365aa72689a428258b5db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include "print.h"

__attribute__((noreturn)) void panic(const char *msg) {
    print_set_color(PRINT_COLOR_BLACK, PRINT_COLOR_RED);
    print_clear();
    printf("PANIC!!\n\t%s", msg);
    __asm__ volatile("cli; hlt");
    while (1)
        ;
}

__attribute__((noreturn)) void exception_handler(void);
void exception_handler() { panic("KERNEL EXCEPTION"); }