Staging: epl: remove REENTRANT
[firefly-linux-kernel-4.4.55.git] / 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 #ifndef QWORD
27 #define QWORD long long int
28 #endif
29
30 #ifndef CONST
31 #define CONST const             // variables mapped to ROM (i.e. flash)
32 #endif
33
34 #define TRACE  printk
35
36 #ifndef SHORT
37 #define SHORT short int
38 #endif
39 #ifndef USHORT
40 #define USHORT unsigned short int
41 #endif
42 #ifndef INT
43 #define INT int
44 #endif
45 #ifndef UINT
46 #define UINT unsigned int
47 #endif
48 #ifndef LONG
49 #define LONG long int
50 #endif
51 #ifndef ULONG
52 #define ULONG unsigned long int
53 #endif
54     // --- logic types ---
55 #ifndef BYTE
56 #define BYTE unsigned char
57 #endif
58 #ifndef WORD
59 #define WORD unsigned short int
60 #endif
61 #ifndef DWORD
62 #define DWORD unsigned long int
63 #endif
64 #ifndef BOOL
65 #define BOOL unsigned char
66 #endif
67     // --- alias types ---
68 #ifndef TRUE
69 #define TRUE  0xFF
70 #endif
71 #ifndef FALSE
72 #define FALSE 0x00
73 #endif
74 #ifndef _TIME_OF_DAY_DEFINED_
75 typedef struct {
76         unsigned long int m_dwMs;
77         unsigned short int m_wDays;
78
79 } tTimeOfDay;
80
81 #define _TIME_OF_DAY_DEFINED_
82
83 #endif
84
85 //---------------------------------------------------------------------------
86 //  Definition von TRACE
87 //---------------------------------------------------------------------------
88
89 #ifndef NDEBUG
90
91 #ifndef TRACE0
92 #define TRACE0(p0)                      TRACE(p0)
93 #endif
94
95 #ifndef TRACE1
96 #define TRACE1(p0, p1)                  TRACE(p0, p1)
97 #endif
98
99 #ifndef TRACE2
100 #define TRACE2(p0, p1, p2)              TRACE(p0, p1, p2)
101 #endif
102
103 #ifndef TRACE3
104 #define TRACE3(p0, p1, p2, p3)          TRACE(p0, p1, p2, p3)
105 #endif
106
107 #ifndef TRACE4
108 #define TRACE4(p0, p1, p2, p3, p4)      TRACE(p0, p1, p2, p3, p4)
109 #endif
110
111 #ifndef TRACE5
112 #define TRACE5(p0, p1, p2, p3, p4, p5)  TRACE(p0, p1, p2, p3, p4, p5)
113 #endif
114
115 #ifndef TRACE6
116 #define TRACE6(p0, p1, p2, p3, p4, p5, p6)  TRACE(p0, p1, p2, p3, p4, p5, p6)
117 #endif
118
119 #else
120
121 #ifndef TRACE0
122 #define TRACE0(p0)
123 #endif
124
125 #ifndef TRACE1
126 #define TRACE1(p0, p1)
127 #endif
128
129 #ifndef TRACE2
130 #define TRACE2(p0, p1, p2)
131 #endif
132
133 #ifndef TRACE3
134 #define TRACE3(p0, p1, p2, p3)
135 #endif
136
137 #ifndef TRACE4
138 #define TRACE4(p0, p1, p2, p3, p4)
139 #endif
140
141 #ifndef TRACE5
142 #define TRACE5(p0, p1, p2, p3, p4, p5)
143 #endif
144
145 #ifndef TRACE6
146 #define TRACE6(p0, p1, p2, p3, p4, p5, p6)
147 #endif
148
149 #endif
150
151 //---------------------------------------------------------------------------
152 //  definition of ASSERT
153 //---------------------------------------------------------------------------
154
155 #ifndef ASSERT
156 #define ASSERT(p)
157 #endif
158
159 //---------------------------------------------------------------------------
160 //  SYS TEC extensions
161 //---------------------------------------------------------------------------
162
163 // This macro doesn't print out C-file and line number of the failed assertion
164 // but a string, which exactly names the mistake.
165 #ifndef NDEBUG
166
167 #define ASSERTMSG(expr,string)  if (!(expr)) {\
168                                         PRINTF0 ("Assertion failed: " string );\
169                                         while (1);}
170 #else
171 #define ASSERTMSG(expr,string)
172 #endif
173
174 //---------------------------------------------------------------------------
175
176 #endif // #ifndef _GLOBAL_H_
177
178 // Please keep an empty line at the end of this file.