#ifdef EFL_HAVE_POSIX_THREADS
#include <pthread.h>
+
+# ifdef EFL_DEBUG_THREADS
+# include <assert.h>
+# endif
#endif
#ifdef EFL_HAVE_WIN32_THREADS
#define INF(...) EINA_LOG_DOM_INFO(_eina_mempool_log_dom, __VA_ARGS__)
#endif
-#ifdef EFL_DEBUG_THREADS
-#include <assert.h>
-#endif
-
typedef struct _Chained_Mempool Chained_Mempool;
struct _Chained_Mempool
{
int group_size;
int usage;
#ifdef EFL_HAVE_THREADS
-#ifdef EFL_DEBUG_THREADS
- pthread_t self;
-#endif
# ifdef EFL_HAVE_POSIX_THREADS
+# ifdef EFL_DEBUG_THREADS
+ pthread_t self;
+# endif
pthread_mutex_t mutex;
# else
HANDLE mutex;
mp->item_alloc = eina_mempool_alignof(item_size);
mp->group_size = mp->item_alloc * mp->pool_size;
mp->alloc_size = mp->group_size + eina_mempool_alignof(sizeof(Chained_Pool));
-#ifdef EFL_DEBUG_THREADS
- mp->self = pthread_self();
-#endif
#ifdef EFL_HAVE_THREADS
# ifdef EFL_HAVE_POSIX_THREADS
+# ifdef EFL_DEBUG_THREADS
+ mp->self = pthread_self();
+# endif
pthread_mutex_init(&mp->mutex, NULL);
# else
mp->mutex = CreateMutex(NULL, FALSE, NULL);
}
#ifdef EFL_HAVE_THREADS
-#ifdef EFL_DEBUG_THREADS
- assert(mp->self == pthread_self());
-#endif
# ifdef EFL_HAVE_POSIX_THREADS
+# ifdef EFL_DEBUG_THREADS
+ assert(mp->self == pthread_self());
+# endif
pthread_mutex_destroy(&mp->mutex);
# else
CloseHandle(mp->mutex);