nilfs2: segment usage file
[linux-2.6] / drivers / staging / epl / global.h
1 /****************************************************************************
2
3     global project definition file
4
5     12.06.1998   -rs
6     11.02.2002   r.d. Erweiterungen, Ergaenzungen
7     20.08.2002   SYS TEC electronic -as
8                  Definition Schluesselwort 'GENERIC'
9                  fuer das Erzeugen von Generic Pointer
10     28.08.2002   r.d. erweiterter SYS TEC Debug Code
11     16.09.2002   r.d. komplette Uebersetzung in Englisch
12     11.04.2003   f.j. Ergaenzung fuer Mitsubishi NC30 Compiler
13     17.06.2003   -rs  Definition von Basistypen in <#ifndef _WINDEF_> gesetzt
14     16.04.2004   r.d. Ergaenzung fuer Borland C++ Builder
15     30.08.2004   -rs  TRACE5 eingefügt
16     23.12.2005   d.k. Definitions for IAR compiler
17
18     $Id: global.h,v 1.6 2008/11/07 13:55:56 D.Krueger Exp $
19
20 ****************************************************************************/
21
22 #ifndef _GLOBAL_H_
23 #define _GLOBAL_H_
24
25
26 #define TRACE  printk
27
28 // --- logic types ---
29 #ifndef BOOL
30 #define BOOL unsigned char
31 #endif
32
33 // --- alias types ---
34 #ifndef TRUE
35 #define TRUE  0xFF
36 #endif
37 #ifndef FALSE
38 #define FALSE 0x00
39 #endif
40 #ifndef _TIME_OF_DAY_DEFINED_
41 typedef struct {
42         unsigned long int m_dwMs;
43         unsigned short int m_wDays;
44
45 } tTimeOfDay;
46
47 #define _TIME_OF_DAY_DEFINED_
48
49 #endif
50
51 //---------------------------------------------------------------------------
52 //  Definition von TRACE
53 //---------------------------------------------------------------------------
54
55 #ifndef NDEBUG
56
57 #ifndef TRACE0
58 #define TRACE0(p0)                      TRACE(p0)
59 #endif
60
61 #ifndef TRACE1
62 #define TRACE1(p0, p1)                  TRACE(p0, p1)
63 #endif
64
65 #ifndef TRACE2
66 #define TRACE2(p0, p1, p2)              TRACE(p0, p1, p2)
67 #endif
68
69 #ifndef TRACE3
70 #define TRACE3(p0, p1, p2, p3)          TRACE(p0, p1, p2, p3)
71 #endif
72
73 #ifndef TRACE4
74 #define TRACE4(p0, p1, p2, p3, p4)      TRACE(p0, p1, p2, p3, p4)
75 #endif
76
77 #ifndef TRACE5
78 #define TRACE5(p0, p1, p2, p3, p4, p5)  TRACE(p0, p1, p2, p3, p4, p5)
79 #endif
80
81 #ifndef TRACE6
82 #define TRACE6(p0, p1, p2, p3, p4, p5, p6)  TRACE(p0, p1, p2, p3, p4, p5, p6)
83 #endif
84
85 #else
86
87 #ifndef TRACE0
88 #define TRACE0(p0)
89 #endif
90
91 #ifndef TRACE1
92 #define TRACE1(p0, p1)
93 #endif
94
95 #ifndef TRACE2
96 #define TRACE2(p0, p1, p2)
97 #endif
98
99 #ifndef TRACE3
100 #define TRACE3(p0, p1, p2, p3)
101 #endif
102
103 #ifndef TRACE4
104 #define TRACE4(p0, p1, p2, p3, p4)
105 #endif
106
107 #ifndef TRACE5
108 #define TRACE5(p0, p1, p2, p3, p4, p5)
109 #endif
110
111 #ifndef TRACE6
112 #define TRACE6(p0, p1, p2, p3, p4, p5, p6)
113 #endif
114
115 #endif
116
117 //---------------------------------------------------------------------------
118 //  definition of ASSERT
119 //---------------------------------------------------------------------------
120
121 #ifndef ASSERT
122 #define ASSERT(p)
123 #endif
124
125 //---------------------------------------------------------------------------
126 //  SYS TEC extensions
127 //---------------------------------------------------------------------------
128
129 // This macro doesn't print out C-file and line number of the failed assertion
130 // but a string, which exactly names the mistake.
131 #ifndef NDEBUG
132
133 #define ASSERTMSG(expr,string)  if (!(expr)) {\
134                                         PRINTF0 ("Assertion failed: " string );\
135                                         while (1);}
136 #else
137 #define ASSERTMSG(expr,string)
138 #endif
139
140 //---------------------------------------------------------------------------
141
142 #endif // #ifndef _GLOBAL_H_
143
144 // Please keep an empty line at the end of this file.