alsa.audio: move handling of XRUN when writting to the slave task
[AROS.git] / rom / filesys / SFS / FS / debug.h
blob1920eabc974b3a93762dbb69c8587546b437421f
1 #ifndef _DEBUG_H
2 #define _DEBUG_H
4 #include <exec/types.h>
5 #include <proto/debug.h>
6 #include <proto/dos.h>
8 #include "debug_protos.h"
9 #include "fs.h"
10 #include "globals.h"
12 #ifdef __AROS__
13 #include <aros/debug.h>
14 #else
16 #ifdef DEBUG
17 #define D(x) x
18 #else
19 #define D(x)
20 #endif
22 #define bug _DEBUG
24 #endif
26 #ifdef DEBUGCODE
28 #define _TDEBUG(x) \
29 do { \
30 struct DateStamp ds; \
31 DateStamp(&ds); \
32 KPrintF("%4ld.%4ld ", ds.ds_Minute, ds.ds_Tick*2); \
33 KPrintF x; \
34 } while (0)
36 #define _DEBUG(x) KPrintF("[SFS] "); KPrintF x
38 #define xdebug(type,x...) \
39 do { \
40 ULONG debug=globals->mask_debug; \
41 ULONG debugdetailed=globals->mask_debug & ~(DEBUG_CACHEBUFFER|DEBUG_NODES|DEBUG_LOCK|DEBUG_BITMAP); \
42 if((debugdetailed & type)!=0 || ((type & 1)==0 && (debug & type)!=0)) \
43 { \
44 KPrintF(x); \
45 } \
46 } while (0)
48 #define _XDEBUG(x) xdebug x
50 #else
52 #define _TDEBUG(x)
53 #define _DEBUG(x)
54 #define _XDEBUG(x)
56 #endif
59 #define DEBUG_DETAILED (1)
61 #define DEBUG_CACHEBUFFER (2)
62 #define DEBUG_NODES (4)
63 #define DEBUG_IO (8)
64 #define DEBUG_SEEK (16)
65 #define DEBUG_BITMAP (32)
66 #define DEBUG_LOCK (64)
67 #define DEBUG_OBJECTS (128)
68 #define DEBUG_TRANSACTION (256)
70 #define DDEBUG_CACHEBUFFER (DEBUG_DETAILED + DEBUG_CACHEBUFFER)
71 #define DDEBUG_NODES (DEBUG_DETAILED + DEBUG_NODES)
72 #define DDEBUG_IO (DEBUG_DETAILED + DEBUG_IO)
73 #define DDEBUG_SEEK (DEBUG_DETAILED + DEBUG_SEEK)
74 #define DDEBUG_BITMAP (DEBUG_DETAILED + DEBUG_BITMAP)
75 #define DDEBUG_LOCK (DEBUG_DETAILED + DEBUG_LOCK)
76 #define DDEBUG_OBJECTS (DEBUG_DETAILED + DEBUG_OBJECTS)
77 #define DDEBUG_TRANSACTION (DEBUG_DETAILED + DEBUG_TRANSACTION)
79 #endif // _DEBUG_H