mirror of
https://github.com/FDOS/kernel.git
synced 2025-04-08 17:15:17 +02:00
add assert macro
This commit is contained in:
parent
fa0959cb82
commit
93add63a3b
14
hdr/debug.h
14
hdr/debug.h
@ -44,6 +44,16 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* assert macro */
|
||||
#ifdef DEBUG
|
||||
VOID panic(BYTE * s);
|
||||
#define assert(condition) (void)(!(condition)?panic(#condition),0:0)
|
||||
#else
|
||||
#define assert(condition) /* ((void)0) */
|
||||
#endif
|
||||
|
||||
|
||||
/* use to limit output to debug builds */
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_PRINT_COMPORT
|
||||
@ -117,7 +127,9 @@
|
||||
#endif
|
||||
|
||||
/* debug truename */
|
||||
/* #define DEBUG_TRUENAME */
|
||||
#ifdef DEBUG
|
||||
#define DEBUG_TRUENAME
|
||||
#endif
|
||||
#ifdef DEBUG_TRUENAME
|
||||
#define tn_printf(x) DebugPrintf(x)
|
||||
#else
|
||||
|
Loading…
x
Reference in New Issue
Block a user