evas preload: do not lock mutex aready locked.

SVN revision: 38749
This commit is contained in:
Gustavo Sverzut Barbieri 2009-01-23 22:21:04 +00:00
parent 018af5b44c
commit d58031f5fc
1 changed files with 9 additions and 3 deletions

View File

@ -303,9 +303,8 @@ _evas_cache_image_entry_surface_alloc(Evas_Cache_Image *cache,
#ifdef BUILD_ASYNC_PRELOAD
static void
_evas_cache_image_async_call(Image_Entry *im)
_evas_cache_image_async_call__unlocked(Image_Entry *im)
{
pthread_mutex_lock(&mutex);
while (im->targets)
{
Evas_Cache_Target *tmp = im->targets;
@ -315,6 +314,13 @@ _evas_cache_image_async_call(Image_Entry *im)
im->targets = (Evas_Cache_Target*) eina_inlist_remove(EINA_INLIST_GET(im->targets), EINA_INLIST_GET(im->targets));
free(tmp);
}
}
static void
_evas_cache_image_async_call(Image_Entry *im)
{
pthread_mutex_lock(&mutex);
_evas_cache_image_async_call__unlocked(im);
pthread_mutex_unlock(&mutex);
}
@ -407,7 +413,7 @@ _evas_cache_image_entry_preload_remove(Image_Entry *ie, const void *target)
}
}
} else {
_evas_cache_image_async_call(ie);
_evas_cache_image_async_call__unlocked(ie);
while (ie->targets)
{