* eina: make Vincent happy.
authorcedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 13 Oct 2010 16:30:22 +0000 (16:30 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 13 Oct 2010 16:30:22 +0000 (16:30 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/eina@53362 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/modules/mp/chained_pool/eina_chained_mempool.c

index 6057dd0..219eb6c 100644 (file)
 
 #ifdef EFL_HAVE_POSIX_THREADS
 #include <pthread.h>
+
+# ifdef EFL_DEBUG_THREADS
+#  include <assert.h>
+# endif
 #endif
 
 #ifdef EFL_HAVE_WIN32_THREADS
@@ -52,10 +56,6 @@ static int _eina_mempool_log_dom = -1;
 #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
 {
@@ -67,10 +67,10 @@ 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;
@@ -308,12 +308,12 @@ eina_chained_mempool_init(const char *context,
    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);
@@ -346,10 +346,10 @@ eina_chained_mempool_shutdown(void *data)
      }
 
 #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);