-static Eina_Bool _threads_activated = EINA_FALSE;
-# ifdef EFL_HAVE_POSIX_THREADS
-static pthread_mutex_t _mutex = PTHREAD_MUTEX_INITIALIZER;
-# define LOCK() if(_threads_activated) pthread_mutex_lock(&_mutex)
-# define UNLOCK() if(_threads_activated) pthread_mutex_unlock(&_mutex)
-# define UNLOCK_FORCE() pthread_mutex_unlock(&_mutex)
-# else /* EFL_HAVE_WIN32_THREADS */
-static HANDLE _mutex = NULL;
-# define LOCK() if(_threads_activated) WaitForSingleObject(_mutex, INFINITE)
-# define UNLOCK() if(_threads_activated) ReleaseMutex(_mutex)
-# define UNLOCK_FORCE() ReleaseMutex(_mutex)
+# ifdef _WIN32
+EAPI DWORD _eina_main_loop;
+# else
+EAPI pthread_t _eina_main_loop;
+# endif
+static pid_t _eina_pid;
+#endif
+
+#ifdef MT
+static int _mt_enabled = 0;
+#endif
+
+#ifdef EFL_HAVE_THREADS
+EAPI int _eina_threads_debug = 0;
+# if !defined(_WIN32_WCE) && !defined(_WIN32)
+EAPI pthread_mutex_t _eina_tracking_lock;
+EAPI Eina_Inlist *_eina_tracking = NULL;