5 #include <KernelExport.h>
11 #ifdef DEBUG_WAIT_ON_MSG
12 # define DEBUG_WAIT snooze( DEBUG_WAIT_ON_MSG );
17 #ifdef DEBUG_WAIT_ON_ERROR
18 # define DEBUG_WAIT_ERROR snooze( DEBUG_WAIT_ON_ERROR );
20 # define DEBUG_WAIT_ERROR
23 #ifndef DEBUG_MAX_LEVEL_FLOW
24 # define DEBUG_MAX_LEVEL_FLOW 4
27 #ifndef DEBUG_MAX_LEVEL_INFO
28 # define DEBUG_MAX_LEVEL_INFO 4
31 #ifndef DEBUG_MAX_LEVEL_ERROR
32 # define DEBUG_MAX_LEVEL_ERROR 4
35 #ifndef DEBUG_MSG_PREFIX
36 # define DEBUG_MSG_PREFIX ""
39 #ifndef debug_level_flow
40 # define debug_level_flow 0
43 #ifndef debug_level_info
44 # define debug_level_info 1
47 #ifndef debug_level_error
48 # define debug_level_error 2
51 #define FUNC_NAME DEBUG_MSG_PREFIX, __FUNCTION__
53 #define SHOW_FLOW(seriousness, format, param...) \
54 do { if( seriousness <= debug_level_flow && seriousness <= DEBUG_MAX_LEVEL_FLOW ) { \
55 dprintf("%s%s: " format "\n", FUNC_NAME, param ); DEBUG_WAIT \
58 #define SHOW_FLOW0(seriousness, format) \
59 do { if( seriousness <= debug_level_flow && seriousness <= DEBUG_MAX_LEVEL_FLOW ) { \
60 dprintf("%s%s: " format "\n", FUNC_NAME); DEBUG_WAIT \
63 #define SHOW_INFO(seriousness, format, param...) \
64 do { if( seriousness <= debug_level_info && seriousness <= DEBUG_MAX_LEVEL_INFO ) { \
65 dprintf("%s%s: " format "\n", FUNC_NAME, param ); DEBUG_WAIT \
68 #define SHOW_INFO0(seriousness, format) \
69 do { if( seriousness <= debug_level_info && seriousness <= DEBUG_MAX_LEVEL_INFO ) { \
70 dprintf("%s%s: " format "\n", FUNC_NAME); DEBUG_WAIT \
73 #define SHOW_ERROR(seriousness, format, param...) \
74 do { if( seriousness <= debug_level_error && seriousness <= DEBUG_MAX_LEVEL_ERROR ) { \
75 dprintf("%s%s: " format "\n", FUNC_NAME, param ); DEBUG_WAIT_ERROR \
78 #define SHOW_ERROR0(seriousness, format) \
79 do { if( seriousness <= debug_level_error && seriousness <= DEBUG_MAX_LEVEL_ERROR ) { \
80 dprintf("%s%s: " format "\n", FUNC_NAME); DEBUG_WAIT_ERROR \
84 #endif /* _WRAPPER_H */