use macros for lock/unlock in .c file

SVN revision: 39473
This commit is contained in:
Carsten Haitzler 2009-03-14 05:08:08 +00:00
parent d9d7c7d23b
commit b4465ec30a
1 changed files with 6 additions and 6 deletions

View File

@ -186,7 +186,7 @@ _evas_cache_image_entry_delete(Evas_Cache_Image *cache, Image_Entry *ie)
cache->func.surface_delete(ie); cache->func.surface_delete(ie);
#ifdef BUILD_ASYNC_PRELOAD #ifdef BUILD_ASYNC_PRELOAD
pthread_mutex_destroy(&ie->lock); LKD(ie->lock);
#endif #endif
cache->func.dealloc(ie); cache->func.dealloc(ie);
@ -237,7 +237,7 @@ _evas_cache_image_entry_new(Evas_Cache_Image *cache,
ie->scale = 1; ie->scale = 1;
#ifdef BUILD_ASYNC_PRELOAD #ifdef BUILD_ASYNC_PRELOAD
pthread_mutex_init(&ie->lock, NULL); LKI(ie->lock);
ie->targets = NULL; ie->targets = NULL;
#endif #endif
@ -1028,13 +1028,13 @@ evas_cache_image_load_data(Image_Entry *im)
/* We check a first time, to prevent useless lock. */ /* We check a first time, to prevent useless lock. */
_evas_cache_image_entry_preload_remove(im, NULL); _evas_cache_image_entry_preload_remove(im, NULL);
if (im->flags.loaded) return ; if (im->flags.loaded) return ;
pthread_mutex_lock(&im->lock); LKL(im->lock);
#endif #endif
error = cache->func.load(im); error = cache->func.load(im);
#ifdef BUILD_ASYNC_PRELOAD #ifdef BUILD_ASYNC_PRELOAD
pthread_mutex_unlock(&im->lock); LKU(im->lock);
#endif #endif
if (cache->func.debug) if (cache->func.debug)
@ -1231,7 +1231,7 @@ _evas_cache_background_load(void *data)
Evas_Cache_Image *cache; Evas_Cache_Image *cache;
int error; int error;
pthread_mutex_lock(&current->lock); LKL(current->lock);
cache = current->cache; cache = current->cache;
error = cache->func.load(current); error = cache->func.load(current);
@ -1251,7 +1251,7 @@ _evas_cache_background_load(void *data)
current->flags.preload = 0; current->flags.preload = 0;
pthread_mutex_unlock(&current->lock); LKU(current->lock);
_evas_cache_image_async_call(current); _evas_cache_image_async_call(current);
current = NULL; current = NULL;