aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules
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
parent6589b75b984d7afce960f76bce83063743eddde9 (diff)
downloadefl-c432e725824c749af5ac6f437fcc94becc9a597f.tar.gz
efl-c432e725824c749af5ac6f437fcc94becc9a597f.tar.xz
efl-c432e725824c749af5ac6f437fcc94becc9a597f.zip
efl: unify EFL_DEBUG_THREADS and EINA_HAVE_DEBUG_THREADS
SVN revision: 77821
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/eina/mp/chained_pool/eina_chained_mempool.c15
-rw-r--r--src/modules/eina/mp/one_big/eina_one_big.c11
2 files changed, 14 insertions, 12 deletions
diff --git a/src/modules/eina/mp/chained_pool/eina_chained_mempool.c b/src/modules/eina/mp/chained_pool/eina_chained_mempool.c
index c3985c2d6..8ed2b4221 100644
--- a/src/modules/eina/mp/chained_pool/eina_chained_mempool.c
+++ b/src/modules/eina/mp/chained_pool/eina_chained_mempool.c
@@ -26,7 +26,7 @@
#ifdef EFL_HAVE_POSIX_THREADS
#include <pthread.h>
-# ifdef EFL_DEBUG_THREADS
+# ifdef EINA_HAVE_DEBUG_THREADS
# include <assert.h>
# endif
#endif
@@ -41,6 +41,7 @@
# undef WIN32_LEAN_AND_MEAN
#endif
+#include "eina_config.h"
#include "eina_inlist.h"
#include "eina_error.h"
#include "eina_module.h"
@@ -81,7 +82,7 @@ struct _Chained_Mempool
#ifdef EINA_DEBUG_MALLOC
int minimal_size;
#endif
-#ifdef EFL_DEBUG_THREADS
+#ifdef EINA_HAVE_DEBUG_THREADS
pthread_t self;
#endif
Eina_Lock mutex;
@@ -264,7 +265,7 @@ eina_chained_mempool_malloc(void *data, EINA_UNUSED unsigned int size)
if (!eina_lock_take(&pool->mutex))
{
-#ifdef EFL_DEBUG_THREADS
+#ifdef EINA_HAVE_DEBUG_THREADS
assert(pthread_equal(pool->self, pthread_self()));
#endif
}
@@ -314,7 +315,7 @@ eina_chained_mempool_free(void *data, void *ptr)
// look 4 pool
if (!eina_lock_take(&pool->mutex))
{
-#ifdef EFL_DEBUG_THREADS
+#ifdef EINA_HAVE_DEBUG_THREADS
assert(pthread_equal(pool->self, pthread_self()));
#endif
}
@@ -359,7 +360,7 @@ eina_chained_mempool_repack(void *data,
/* FIXME: Improvement - per Chained_Pool lock */
if (!eina_lock_take(&pool->mutex))
{
-#ifdef EFL_DEBUG_THREADS
+#ifdef EINA_HAVE_DEBUG_THREADS
assert(pthread_equal(pool->self, pthread_self()));
#endif
}
@@ -477,7 +478,7 @@ eina_chained_mempool_init(const char *context,
VALGRIND_CREATE_MEMPOOL(mp, 0, 1);
#endif
-#ifdef EFL_DEBUG_THREADS
+#ifdef EINA_HAVE_DEBUG_THREADS
mp->self = pthread_self();
#endif
@@ -521,7 +522,7 @@ eina_chained_mempool_shutdown(void *data)
eina_lock_free(&mp->mutex);
-#ifdef EFL_DEBUG_THREADS
+#ifdef EINA_HAVE_DEBUG_THREADS
assert(pthread_equal(mp->self, pthread_self()));
#endif
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 c23c47837..42c47ee68 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 @@
# undef WIN32_LEAN_AND_MEAN
#endif
+#include "eina_config.h"
#include "eina_mempool.h"
#include "eina_trash.h"
#include "eina_inlist.h"
@@ -76,7 +77,7 @@ struct _One_Big
Eina_Trash *empty;
Eina_Inlist *over_list;
-#ifdef EFL_DEBUG_THREADS
+#ifdef EINA_HAVE_DEBUG_THREADS
pthread_t self;
#endif
Eina_Lock mutex;
@@ -90,7 +91,7 @@ eina_one_big_malloc(void *data, EINA_UNUSED unsigned int size)
if (!eina_lock_take(&pool->mutex))
{
-#ifdef EFL_DEBUG_THREADS
+#ifdef EINA_HAVE_DEBUG_THREADS
assert(pthread_equal(pool->self, pthread_self()));
#endif
}
@@ -158,7 +159,7 @@ eina_one_big_free(void *data, void *ptr)
if (!eina_lock_take(&pool->mutex))
{
-#ifdef EFL_DEBUG_THREADS
+#ifdef EINA_HAVE_DEBUG_THREADS
assert(pthread_equal(pool->self, pthread_self()));
#endif
}
@@ -231,7 +232,7 @@ eina_one_big_init(const char *context,
memcpy((char *)pool->name, context, length);
}
-#ifdef EFL_DEBUG_THREADS
+#ifdef EINA_HAVE_DEBUG_THREADS
pool->self = pthread_self();
#endif
eina_lock_new(&pool->mutex);
@@ -251,7 +252,7 @@ eina_one_big_shutdown(void *data)
if (!pool) return;
if (!eina_lock_take(&pool->mutex))
{
-#ifdef EFL_DEBUG_THREADS
+#ifdef EINA_HAVE_DEBUG_THREADS
assert(pthread_equal(pool->self, pthread_self()));
#endif
}