Merge pull request #3831 from rolfbjarne/watchos-fix-defaultproxy-test
[mono.git] / mono / utils / mono-threads-debug.h
1
2 #ifndef __MONO_UTILS_MONO_THREADS_DEBUG_H__
3 #define __MONO_UTILS_MONO_THREADS_DEBUG_H__
4
5 /* Logging - enable them below if you need specific logging for the category you need */
6 #define MOSTLY_ASYNC_SAFE_PRINTF(...) do { \
7         char __buff[1024];      __buff [0] = '\0'; \
8         g_snprintf (__buff, sizeof (__buff), __VA_ARGS__);      \
9         write (1, __buff, strlen (__buff));     \
10 } while (0)
11
12 #if 1
13 #define THREADS_DEBUG(...)
14 #else
15 #define THREADS_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
16 #endif
17
18 #if 1
19 #define THREADS_STW_DEBUG(...)
20 #else
21 #define THREADS_STW_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
22 #endif
23
24 #if 1
25 #define THREADS_SUSPEND_DEBUG(...)
26 #else
27 #define THREADS_SUSPEND_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
28 #endif
29
30 #if 1
31 #define THREADS_STATE_MACHINE_DEBUG(...)
32 #else
33 #define THREADS_STATE_MACHINE_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
34 #endif
35
36 #if 1
37 #define THREADS_INTERRUPT_DEBUG(...)
38 #else
39 #define THREADS_INTERRUPT_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
40 #endif
41
42 #endif /* __MONO_UTILS_MONO_THREADS_DEBUG_H__ */