mirror of
https://github.com/kenshineto/kern.git
synced 2025-04-21 12:47:25 +00:00
16 lines
270 B
C
16 lines
270 B
C
#include <lib.h>
|
|
#include <stdarg.h>
|
|
#include <comus/asm.h>
|
|
|
|
__attribute__((noreturn)) void panic(const char *format, ...)
|
|
{
|
|
cli();
|
|
va_list list;
|
|
va_start(list, format);
|
|
printf("\n\n!!! PANIC !!!\n");
|
|
vprintf(format, list);
|
|
printf("\n\n");
|
|
|
|
while (1)
|
|
halt();
|
|
}
|