Added kernel panic function
This commit is contained in:
6
common.h
6
common.h
@@ -13,6 +13,12 @@
|
|||||||
|
|
||||||
#define offsetof(type, member) ((size_t)&(((type*)0)->member))
|
#define offsetof(type, member) ((size_t)&(((type*)0)->member))
|
||||||
|
|
||||||
|
#define PANIC(fmt, ...) \
|
||||||
|
do { \
|
||||||
|
printf("panic %s:%d" fmt "\n", __FILE__, __LINE__, ## __VAR_ARGS__); \
|
||||||
|
while(1){}; \
|
||||||
|
} while(0)
|
||||||
|
|
||||||
typedef int bool;
|
typedef int bool;
|
||||||
typedef unsigned char uint8_t;
|
typedef unsigned char uint8_t;
|
||||||
typedef unsigned short uint16_t ;
|
typedef unsigned short uint16_t ;
|
||||||
|
|||||||
Reference in New Issue
Block a user