blob: 610c3d31f10209d3fffe95b6b418dd862a2a7a60 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#include <stdarg.h>
#include "stdio.h"
#include "stdlib.h"
// abaos has a kernel_panic function
// TODO: we should not need this stub, rather, libc functions should
// use other means to abort the process (e.g. with abort), then the
// kernel should catch this exception and issue the kernel_panic itself.
// anyway: the kernel has to decide whether it dies in panic or it
// kills the culprid child an merely goes his way..
void kernel_panic( const char *format, ... )
{
(void)printf( "\n*** KERNEL PANIC ***\n" );
va_list args;
va_start( args, format );
(void)vprintf( format, args );
va_end( args );
puts( "" );
exit( 255 );
}
|