summaryrefslogtreecommitdiff
path: root/src/modules/eina/mp/one_big/eina_one_big.c
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2012-10-10 21:48:34 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2012-10-10 21:48:34 +0000
commitc432e725824c749af5ac6f437fcc94becc9a597f (patch)
tree5128601103ccfdeb3261d98c7d2c65e75089c82b /src/modules/eina/mp/one_big/eina_one_big.c
parent6589b75b984d7afce960f76bce83063743eddde9 (diff)
efl: unify EFL_DEBUG_THREADS and EINA_HAVE_DEBUG_THREADS
SVN revision: 77821
Diffstat (limited to '')
-rw-r--r--src/modules/eina/mp/one_big/eina_one_big.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/modules/eina/mp/one_big/eina_one_big.c b/src/modules/eina/mp/one_big/eina_one_big.c
index c23c47837c..42c47ee685 100644
--- a/src/modules/eina/mp/one_big/eina_one_big.c
+++ b/src/modules/eina/mp/one_big/eina_one_big.c
@@ -35,6 +35,7 @@
35# undef WIN32_LEAN_AND_MEAN 35# undef WIN32_LEAN_AND_MEAN
36#endif 36#endif
37 37
38#include "eina_config.h"
38#include "eina_mempool.h" 39#include "eina_mempool.h"
39#include "eina_trash.h" 40#include "eina_trash.h"
40#include "eina_inlist.h" 41#include "eina_inlist.h"
@@ -76,7 +77,7 @@ struct _One_Big
76 Eina_Trash *empty; 77 Eina_Trash *empty;
77 Eina_Inlist *over_list; 78 Eina_Inlist *over_list;
78 79
79#ifdef EFL_DEBUG_THREADS 80#ifdef EINA_HAVE_DEBUG_THREADS
80 pthread_t self; 81 pthread_t self;
81#endif 82#endif
82 Eina_Lock mutex; 83 Eina_Lock mutex;
@@ -90,7 +91,7 @@ eina_one_big_malloc(void *data, EINA_UNUSED unsigned int size)
90 91
91 if (!eina_lock_take(&pool->mutex)) 92 if (!eina_lock_take(&pool->mutex))
92 { 93 {
93#ifdef EFL_DEBUG_THREADS 94#ifdef EINA_HAVE_DEBUG_THREADS
94 assert(pthread_equal(pool->self, pthread_self())); 95 assert(pthread_equal(pool->self, pthread_self()));
95#endif 96#endif
96 } 97 }
@@ -158,7 +159,7 @@ eina_one_big_free(void *data, void *ptr)
158 159
159 if (!eina_lock_take(&pool->mutex)) 160 if (!eina_lock_take(&pool->mutex))
160 { 161 {
161#ifdef EFL_DEBUG_THREADS 162#ifdef EINA_HAVE_DEBUG_THREADS
162 assert(pthread_equal(pool->self, pthread_self())); 163 assert(pthread_equal(pool->self, pthread_self()));
163#endif 164#endif
164 } 165 }
@@ -231,7 +232,7 @@ eina_one_big_init(const char *context,
231 memcpy((char *)pool->name, context, length); 232 memcpy((char *)pool->name, context, length);
232 } 233 }
233 234
234#ifdef EFL_DEBUG_THREADS 235#ifdef EINA_HAVE_DEBUG_THREADS
235 pool->self = pthread_self(); 236 pool->self = pthread_self();
236#endif 237#endif
237 eina_lock_new(&pool->mutex); 238 eina_lock_new(&pool->mutex);
@@ -251,7 +252,7 @@ eina_one_big_shutdown(void *data)
251 if (!pool) return; 252 if (!pool) return;
252 if (!eina_lock_take(&pool->mutex)) 253 if (!eina_lock_take(&pool->mutex))
253 { 254 {
254#ifdef EFL_DEBUG_THREADS 255#ifdef EINA_HAVE_DEBUG_THREADS
255 assert(pthread_equal(pool->self, pthread_self())); 256 assert(pthread_equal(pool->self, pthread_self()));
256#endif 257#endif
257 } 258 }