From c8a556bd1ce1cebbb90848114d01238621d3e58f Mon Sep 17 00:00:00 2001 From: cedric Date: Wed, 13 Oct 2010 16:30:22 +0000 Subject: [PATCH] * eina: make Vincent happy. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eina@53362 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/modules/mp/chained_pool/eina_chained_mempool.c | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/modules/mp/chained_pool/eina_chained_mempool.c b/src/modules/mp/chained_pool/eina_chained_mempool.c index 6057dd0..219eb6c 100644 --- a/src/modules/mp/chained_pool/eina_chained_mempool.c +++ b/src/modules/mp/chained_pool/eina_chained_mempool.c @@ -25,6 +25,10 @@ #ifdef EFL_HAVE_POSIX_THREADS #include + +# ifdef EFL_DEBUG_THREADS +# include +# 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 -#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); -- 2.7.4