aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--NEWS2
-rw-r--r--src/modules/eina/mp/chained_pool/eina_chained_mempool.c20
3 files changed, 12 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index ba374ef462..bc5ce0c02e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,8 +8,7 @@
2013-10-11 Cedric Bail
* Eina: add Eina_Spinlock API,
- use Eina_Spinlock in Eina_Log, replace Eina_Lock by Eina_Spinlock in Eina_Stringshare,
- Eina_Chained_Mempool.
+ use Eina_Spinlock in Eina_Log, replace Eina_Lock by Eina_Spinlock in Eina_Stringshare.
* Eet: replace Eina_Lock by Eina_Spinlock in Eet_Dictionnary.
* Evas: replace Eina_Lock by Eina_Spinlock in Evas_ScaleCache, Evas_Async_Events and Image_Entry.
* Ecore: use Eina_Spinlock for Ecore_Thread.
diff --git a/NEWS b/NEWS
index 210b8f55dd..fa799cbfc3 100644
--- a/NEWS
+++ b/NEWS
@@ -200,7 +200,7 @@ Improvements:
- Eina_Tiler now take tile size into account.
- Improve support for 64bits system.
- eina_strlcat now work with a NULL source.
- - Use Eina_Spinlock for eina_log, eina_stringshare and chained_mempool.
+ - Use Eina_Spinlock for eina_log, eina_stringshare.
* Eet:
- Display more information with eet -l -v.
- Force thread to always run during eet_cache_concurrency test.
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 b71b79dcf4..c0257b1f8f 100644
--- a/src/modules/eina/mp/chained_pool/eina_chained_mempool.c
+++ b/src/modules/eina/mp/chained_pool/eina_chained_mempool.c
@@ -83,7 +83,7 @@ struct _Chained_Mempool
#ifdef EINA_HAVE_DEBUG_THREADS
Eina_Thread self;
#endif
- Eina_Spinlock mutex;
+ Eina_Lock mutex;
};
typedef struct _Chained_Pool Chained_Pool;
@@ -262,7 +262,7 @@ eina_chained_mempool_malloc(void *data, EINA_UNUSED unsigned int size)
Chained_Pool *p = NULL;
void *mem;
- if (!eina_spinlock_take(&pool->mutex))
+ if (!eina_lock_take(&pool->mutex))
{
#ifdef EINA_HAVE_DEBUG_THREADS
assert(eina_thread_equal(pool->self, eina_thread_self()));
@@ -288,7 +288,7 @@ eina_chained_mempool_malloc(void *data, EINA_UNUSED unsigned int size)
p = _eina_chained_mp_pool_new(pool);
if (!p)
{
- eina_spinlock_release(&pool->mutex);
+ eina_lock_release(&pool->mutex);
return NULL;
}
@@ -299,7 +299,7 @@ eina_chained_mempool_malloc(void *data, EINA_UNUSED unsigned int size)
mem = _eina_chained_mempool_alloc_in(pool, p);
- eina_spinlock_release(&pool->mutex);
+ eina_lock_release(&pool->mutex);
return mem;
}
@@ -312,7 +312,7 @@ eina_chained_mempool_free(void *data, void *ptr)
Chained_Pool *p;
// look 4 pool
- if (!eina_spinlock_take(&pool->mutex))
+ if (!eina_lock_take(&pool->mutex))
{
#ifdef EINA_HAVE_DEBUG_THREADS
assert(eina_thread_equal(pool->self, eina_thread_self()));
@@ -343,7 +343,7 @@ eina_chained_mempool_free(void *data, void *ptr)
}
#endif
- eina_spinlock_release(&pool->mutex);
+ eina_lock_release(&pool->mutex);
return;
}
@@ -357,7 +357,7 @@ eina_chained_mempool_repack(void *data,
Chained_Pool *tail;
/* FIXME: Improvement - per Chained_Pool lock */
- if (!eina_spinlock_take(&pool->mutex))
+ if (!eina_lock_take(&pool->mutex))
{
#ifdef EINA_HAVE_DEBUG_THREADS
assert(eina_thread_equal(pool->self, eina_thread_self()));
@@ -430,7 +430,7 @@ eina_chained_mempool_repack(void *data,
}
/* FIXME: improvement - reorder pool so that the most used one get in front */
- eina_spinlock_release(&pool->mutex);
+ eina_lock_release(&pool->mutex);
}
static void *
@@ -486,7 +486,7 @@ eina_chained_mempool_init(const char *context,
mp->self = eina_thread_self();
#endif
- eina_spinlock_new(&mp->mutex);
+ eina_lock_new(&mp->mutex);
return mp;
}
@@ -524,7 +524,7 @@ eina_chained_mempool_shutdown(void *data)
VALGRIND_DESTROY_MEMPOOL(mp);
#endif
- eina_spinlock_free(&mp->mutex);
+ eina_lock_free(&mp->mutex);
#ifdef EINA_HAVE_DEBUG_THREADS
assert(eina_thread_equal(mp->self, eina_thread_self()));