This repository has been archived on 2025-02-27. You can view files and clone it, but cannot push or open issues or pull requests.
portland-os/src/kernel/panic.c
2021-01-24 12:00:11 -05:00

11 lines
264 B
C

#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");
}