summaryrefslogtreecommitdiff
path: root/src/kernel/panic.c
blob: 49fdac1a81e8e508a9149450ebd87621cdbd7a60 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#include <stdint.h>

#include "log.h"

__attribute__ ((noreturn))
void panic(const char *filename, uint32_t line, const char *message) {
  logf(LOG_PANIC, "[%s:%d] %s", filename, line, message);
  logf(LOG_INFO, "Halting");
  while (1)
    asm volatile ("hlt");
}