Merge pull request #7599 from lambdageek/abort-cctor-no-protection
[mono-project.git] / mono / utils / mono-threads-debug.h
blobb983d1b6a1ae36e8a900884839a4e6b543c3b1a0
1 /**
2 * \file
3 */
5 #ifndef __MONO_UTILS_MONO_THREADS_DEBUG_H__
6 #define __MONO_UTILS_MONO_THREADS_DEBUG_H__
8 /* Logging - enable them below if you need specific logging for the category you need */
9 #define MOSTLY_ASYNC_SAFE_PRINTF(...) do { \
10 char __buff[1024]; __buff [0] = '\0'; \
11 g_snprintf (__buff, sizeof (__buff), __VA_ARGS__); \
12 g_write (1, __buff, (guint32)strlen (__buff)); \
13 } while (0)
15 #if 1
16 #define THREADS_DEBUG(...)
17 #else
18 #define THREADS_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
19 #endif
21 #if 1
22 #define THREADS_STW_DEBUG(...)
23 #else
24 #define THREADS_STW_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
25 #endif
27 #if 1
28 #define THREADS_SUSPEND_DEBUG(...)
29 #else
30 #define THREADS_SUSPEND_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
31 #endif
33 #if 1
34 #define THREADS_STATE_MACHINE_DEBUG(...)
35 #else
36 #define THREADS_STATE_MACHINE_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
37 #endif
39 #if 1
40 #define THREADS_INTERRUPT_DEBUG(...)
41 #else
42 #define THREADS_INTERRUPT_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
43 #endif
45 #endif /* __MONO_UTILS_MONO_THREADS_DEBUG_H__ */