kern
diff src/panic.c @ 11:cccaa40f5432
forgot to add a load of stuff
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 19 Feb 2011 04:41:51 +0200 |
parents | |
children | 6c9138a87e02 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/panic.c Sat Feb 19 04:41:51 2011 +0200 1.3 @@ -0,0 +1,16 @@ 1.4 +#include <stdio.h> 1.5 +#include <stdarg.h> 1.6 +#include "asmops.h" 1.7 + 1.8 +void panic(const char *fmt, ...) 1.9 +{ 1.10 + va_list ap; 1.11 + 1.12 + printf("~~~~~ kernel panic ~~~~~\n"); 1.13 + va_start(ap, fmt); 1.14 + vprintf(fmt, ap); 1.15 + va_end(ap); 1.16 + 1.17 + disable_intr(); 1.18 + halt_cpu(); 1.19 +}