mirror of
https://github.com/FDOS/kernel.git
synced 2025-07-21 21:04:43 +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
|
||||||
#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 */
|
/* use to limit output to debug builds */
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
#ifdef DEBUG_PRINT_COMPORT
|
#ifdef DEBUG_PRINT_COMPORT
|
||||||
@ -117,7 +127,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* debug truename */
|
/* debug truename */
|
||||||
/* #define DEBUG_TRUENAME */
|
#ifdef DEBUG
|
||||||
|
#define DEBUG_TRUENAME
|
||||||
|
#endif
|
||||||
#ifdef DEBUG_TRUENAME
|
#ifdef DEBUG_TRUENAME
|
||||||
#define tn_printf(x) DebugPrintf(x)
|
#define tn_printf(x) DebugPrintf(x)
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user