source: trunk/MagicSoft/Cosy/incl/debug.h@ 1822

Last change on this file since 1822 was 731, checked in by tbretz, 24 years ago
*** empty log message ***
File size: 1.5 KB
Line 
1/************************************************************************/
2/* DEBUG-tool */
3/************************************************************************/
4
5#ifdef __cplusplus
6extern "C" {
7#endif
8
9#if DEBUG
10#define LOG_INIT (1 << 0)
11#define LOG_OPEN (1 << 1)
12#define LOG_CLOSE (1 << 2)
13#define LOG_INTR (1 << 3)
14#define LOG_READ (1 << 4)
15#define LOG_WRITE (1 << 5)
16#define LOG_IOCTL (1 << 6)
17#define LOG_DEF (1 << 7)
18
19#define LOG_CAN (1 << 8)
20#define LOG_MIN (1 << 9)
21#define LOG_AST (1 << 10)
22#define LOG_FUNC (1 << 11)
23#define LOG_EXIT (1 << 12)
24#define LOG_INT (1 << 13)
25#define LOG_MMAP (1 << 14)
26#define LOG_LOCK (1 << 15)
27#define LOG_RESET (1 << 16)
28#define LOG_SEM (1 << 17)
29#define LOG_RMAIL (1 << 18)
30#define LOG_WRFAST (1 << 19)
31#define LOG_RDFAST (1 << 20)
32#define LOG_WATCH (1 << 21)
33#define LOG_ROUTE (1 << 22)
34#define LOG_COP (1 << 23)
35#define LOG_TPU (1 << 24)
36#define LOG_PP (1 << 24)
37
38#define LOG_MAX (1 << 31)
39
40#if 0
41static int debug = LOG_RESET | LOG_INIT | LOG_OPEN | LOG_CLOSE | \
42 LOG_IOCTL | LOG_INTR | LOG_WRITE | LOG_READ;
43#endif
44#if 0
45static int debug = LOG_PP | LOG_WATCH | LOG_ROUTE | LOG_RDFAST | LOG_INTR | LOG_TPU | LOG_COP;
46#endif
47#if 1
48static int debug = LOG_WRITE | LOG_INIT | LOG_IOCTL;
49#endif
50
51int printf_ ();
52
53/* #define LOG(level, message) if(debug & level) logMsg message */
54#define LOG(level, message) if(debug & level) printk message
55#else
56#define LOG(level, message)
57#endif
58
59#ifdef __cplusplus
60}
61#endif
Note: See TracBrowser for help on using the repository browser.