83eb715553c2d1a2f0140a06b034bcc693f13857
[reactos.git] / include / ntdll / ntdll.h
1
2 #include <ntos/ntdef.h>
3
4 #define UNIMPLEMENTED DbgPrint("%s in %s:%d is unimplemented\n",__FUNCTION__,__FILE__,__LINE__);
5
6 #ifndef NASSERT
7 #define assert(x) if (!(x)) {DbgPrint("Assertion "#x" failed at %s:%d\n", __FILE__,__LINE__); for(;;);}
8 #else
9 #define assert(x)
10 #endif
11
12 #ifdef NDEBUG
13 #define DPRINT(args...)
14 #define CHECKPOINT
15 #else
16 #define DPRINT(args...) do { DbgPrint("(NTDLL:%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0);
17 #define CHECKPOINT do { DbgPrint("(NTDLL:%s:%d) Checkpoint\n",__FILE__,__LINE__); } while(0);
18 #endif
19
20 #define DPRINT1(args...) do { DbgPrint("(NTDLL:%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0);
21 #define CHECKPOINT1 do { DbgPrint("(NTDLL:%s:%d) Checkpoint\n",__FILE__,__LINE__); } while(0);
22
23 #define ROUNDUP(a,b)    ((((a)+(b)-1)/(b))*(b))
24 #define ROUNDDOWN(a,b)  (((a)/(b))*(b))
25
26 #define  MAGIC(c1,c2,c3,c4)  ((c1) + ((c2)<<8) + ((c3)<<16) + ((c4)<<24))
27
28 #define  MAGIC_HEAP        MAGIC( 'H','E','A','P' )