Add Revison ISO interface
[reactos.git] / reactos / include / win32k / debug1.h
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: include/internal/debug.h
5 * PURPOSE: Useful debugging macros
6 * PROGRAMMER: David Welch (welch@mcmail.com)
7 * UPDATE HISTORY:
8 * 28/05/98: Created
9 */
10
11 /*
12 * NOTE: Define NDEBUG before including this header to disable debugging
13 * macros
14 */
15
16 #ifndef __INTERNAL_DEBUG
17 #define __INTERNAL_DEBUG
18
19 #define UNIMPLEMENTED do {DbgPrint("%s at %s:%d is unimplemented, have a nice day\n",__FUNCTION__,__FILE__,__LINE__); for(;;); } while(0);
20
21 /* FIXME: should probably remove this later */
22 #if !defined(CHECKED) && !defined(NDEBUG)
23 #define CHECKED
24 #endif
25
26 #ifndef NASSERT
27 #ifndef assert
28 #define assert(x) if (!(x)) {DbgPrint("Assertion "#x" failed at %s:%d\n", __FILE__,__LINE__); KeBugCheck(0); }
29 #endif
30 #ifndef ASSERT
31 #define ASSERT(x) assert(x)
32 #endif
33 #else
34 #ifndef assert
35 #define assert(x)
36 #endif
37 #ifndef ASSERT
38 #define ASSERT(x)
39 #endif
40 #endif
41
42 #ifdef DBG
43 #define DPRINT1 DbgPrint("(%s:%d) ",__FILE__,__LINE__), DbgPrint
44 #define CHECKPOINT1 DbgPrint("%s:%d\n",__FILE__,__LINE__);
45 #else
46 #define DPRINT1(args...)
47 #define CHECKPOINT1(args...)
48 #endif
49
50 #ifdef __NTOSKRNL__
51 #define DPRINT_CHECKS
52 #else
53 #define DPRINT_CHECKS
54 #endif
55
56 #ifndef NDEBUG
57 #define DPRINT DbgPrint("(%s:%d) ",__FILE__,__LINE__), DbgPrint
58 #define CHECKPOINT DbgPrint("%s:%d\n",__FILE__,__LINE__);
59 #else
60 #define DPRINT(args...)
61 #define CHECKPOINT
62 #endif /* NDEBUG */
63
64 /*
65 * FUNCTION: Assert a maximum value for the current irql
66 * ARGUMENTS:
67 * x = Maximum irql
68 */
69 #define ASSERT_IRQL(x) assert(KeGetCurrentIrql()<=(x))
70 #define assert_irql(x) assert(KeGetCurrentIrql()<=(x))
71
72 #endif /* __INTERNAL_DEBUG */