int event_debug_mode_on_ = 0;
+#if !defined(EVENT__DISABLE_THREAD_SUPPORT) && !defined(EVENT__DISABLE_DEBUG_MODE)
/**
* @brief debug mode variable which is set for any function/structure that needs
* to be shared across threads (if thread support is enabled).
* See: "Locks and threading" in the documentation.
*/
int event_debug_created_threadable_ctx_ = 0;
+#endif
/* Set if it's too late to enable event_debug_mode. */
static int event_debug_mode_too_late = 0;
/* prepare for threading */
-#ifndef EVENT__DISABLE_THREAD_SUPPORT
+#if !defined(EVENT__DISABLE_THREAD_SUPPORT) && !defined(EVENT__DISABLE_DEBUG_MODE)
event_debug_created_threadable_ctx_ = 1;
+#endif
+#ifndef EVENT__DISABLE_DEBUG_MODE
if (EVTHREAD_LOCKING_ENABLED() &&
(!cfg || !(cfg->flags & EVENT_BASE_FLAG_NOLOCK))) {
int r;