Bump API snapshot submodule
[mono.git] / mono / utils / mono-threads-debug.h
1 /**
2  * \file
3  */
4
5 #ifndef __MONO_UTILS_MONO_THREADS_DEBUG_H__
6 #define __MONO_UTILS_MONO_THREADS_DEBUG_H__
7
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         write (1, __buff, strlen (__buff));     \
13 } while (0)
14
15 #if 1
16 #define THREADS_DEBUG(...)
17 #else
18 #define THREADS_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
19 #endif
20
21 #if 1
22 #define THREADS_STW_DEBUG(...)
23 #else
24 #define THREADS_STW_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
25 #endif
26
27 #if 1
28 #define THREADS_SUSPEND_DEBUG(...)
29 #else
30 #define THREADS_SUSPEND_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
31 #endif
32
33 #if 1
34 #define THREADS_STATE_MACHINE_DEBUG(...)
35 #else
36 #define THREADS_STATE_MACHINE_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
37 #endif
38
39 #if 1
40 #define THREADS_INTERRUPT_DEBUG(...)
41 #else
42 #define THREADS_INTERRUPT_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
43 #endif
44
45 #endif /* __MONO_UTILS_MONO_THREADS_DEBUG_H__ */