mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 20:58:22 +00:00
18 lines
305 B
C
18 lines
305 B
C
#include <panic.h>
|
|
#include <arch/cpu.h>
|
|
#include <printf.h>
|
|
#include <kernel/interrupt.h>
|
|
|
|
__attribute__((noreturn)) void _panic(char *msg, context_t *ctx) {
|
|
printf("cpu%lu: Oops.\n", current_cpu_id());
|
|
|
|
if (msg)
|
|
printf("%s\n", msg);
|
|
|
|
if (ctx)
|
|
PRINT_CTX(ctx);
|
|
|
|
interrupt_set(false);
|
|
for (;;);
|
|
}
|