From b4465ec30a42d252032b76b8255c02a5db0aa3ed Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sat, 14 Mar 2009 05:08:08 +0000 Subject: [PATCH] use macros for lock/unlock in .c file SVN revision: 39473 --- legacy/evas/src/lib/cache/evas_cache_image.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/legacy/evas/src/lib/cache/evas_cache_image.c b/legacy/evas/src/lib/cache/evas_cache_image.c index 97cf9da640..cffa4ca351 100644 --- a/legacy/evas/src/lib/cache/evas_cache_image.c +++ b/legacy/evas/src/lib/cache/evas_cache_image.c @@ -186,7 +186,7 @@ _evas_cache_image_entry_delete(Evas_Cache_Image *cache, Image_Entry *ie) cache->func.surface_delete(ie); #ifdef BUILD_ASYNC_PRELOAD - pthread_mutex_destroy(&ie->lock); + LKD(ie->lock); #endif cache->func.dealloc(ie); @@ -237,7 +237,7 @@ _evas_cache_image_entry_new(Evas_Cache_Image *cache, ie->scale = 1; #ifdef BUILD_ASYNC_PRELOAD - pthread_mutex_init(&ie->lock, NULL); + LKI(ie->lock); ie->targets = NULL; #endif @@ -1028,13 +1028,13 @@ evas_cache_image_load_data(Image_Entry *im) /* We check a first time, to prevent useless lock. */ _evas_cache_image_entry_preload_remove(im, NULL); if (im->flags.loaded) return ; - pthread_mutex_lock(&im->lock); + LKL(im->lock); #endif error = cache->func.load(im); #ifdef BUILD_ASYNC_PRELOAD - pthread_mutex_unlock(&im->lock); + LKU(im->lock); #endif if (cache->func.debug) @@ -1231,7 +1231,7 @@ _evas_cache_background_load(void *data) Evas_Cache_Image *cache; int error; - pthread_mutex_lock(¤t->lock); + LKL(current->lock); cache = current->cache; error = cache->func.load(current); @@ -1251,7 +1251,7 @@ _evas_cache_background_load(void *data) current->flags.preload = 0; - pthread_mutex_unlock(¤t->lock); + LKU(current->lock); _evas_cache_image_async_call(current); current = NULL;