2 #ifndef __MONO_UTILS_MONO_THREADS_DEBUG_H__
3 #define __MONO_UTILS_MONO_THREADS_DEBUG_H__
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)); \
13 #define THREADS_DEBUG(...)
15 #define THREADS_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
19 #define THREADS_STW_DEBUG(...)
21 #define THREADS_STW_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
25 #define THREADS_SUSPEND_DEBUG(...)
27 #define THREADS_SUSPEND_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
31 #define THREADS_STATE_MACHINE_DEBUG(...)
33 #define THREADS_STATE_MACHINE_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
37 #define THREADS_INTERRUPT_DEBUG(...)
39 #define THREADS_INTERRUPT_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
42 #endif /* __MONO_UTILS_MONO_THREADS_DEBUG_H__ */