diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2017-07-13 11:23:03 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2017-07-13 11:23:03 +0200 |
commit | ebb0e5f9fe6707133dacbe70f80831cd1aa5c974 (patch) | |
tree | 23ccd04644fcab179812a093545213dec9907943 /tests/libc/kernel_stub.c | |
parent | ed869aa3867d134fb37f586f1db029006677cebb (diff) | |
download | abaos-ebb0e5f9fe6707133dacbe70f80831cd1aa5c974.tar.gz abaos-ebb0e5f9fe6707133dacbe70f80831cd1aa5c974.tar.bz2 |
added a simple test for malloc/free
added a memorymanager initilializer which works on a buffer instead on an offset
(thus we can but the heap area also onto the stack for testing)
added a kernel_stub module to test modules using kernel_panic (for now, maybe
have a callback later)
Diffstat (limited to 'tests/libc/kernel_stub.c')
-rw-r--r-- | tests/libc/kernel_stub.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/libc/kernel_stub.c b/tests/libc/kernel_stub.c new file mode 100644 index 0000000..c859be0 --- /dev/null +++ b/tests/libc/kernel_stub.c @@ -0,0 +1,18 @@ +#include <stdarg.h> + +#include "stdio.h" +#include "stdlib.h" + +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( "" ); + + abort( ); +} + |