summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjiin.moon <jiin.moon@samsung.com>2016-03-04 15:57:50 -0800
committerCedric BAIL <cedric@osg.samsung.com>2016-03-04 16:09:51 -0800
commit41b8a320a01aa891cbe8e3b5350eb878f07817cc (patch)
tree29d217d8dbfd7dc6f57800acde95b3e577d47b95
parent48461bb94621b7cbc366a00c9f44ccc95d971ba6 (diff)
downloadefl-41b8a320a01aa891cbe8e3b5350eb878f07817cc.tar.gz
evas: fix preload thread deadlock issue
Summary: Wrong condition makes deadlock issue. Reviewers: jpeg, jypark Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D3742 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/lib/evas/cache/evas_cache_image.c4
-rw-r--r--src/lib/evas/include/evas_common_private.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/evas/cache/evas_cache_image.c b/src/lib/evas/cache/evas_cache_image.c
index e1f8c699b3..49b19769e1 100644
--- a/src/lib/evas/cache/evas_cache_image.c
+++ b/src/lib/evas/cache/evas_cache_image.c
@@ -330,6 +330,7 @@ _evas_cache_image_async_heavy(void *data)
current = data;
SLKL(current->lock);
+ current->flags.load_worked = 0;
pchannel = current->channel;
current->channel++;
cache = current->cache;
@@ -373,6 +374,7 @@ _evas_cache_image_async_heavy(void *data)
current->flags.preload_done = 0;
}
SLKU(current->lock_cancel);
+ current->flags.load_worked = 1;
SLKU(current->lock);
}
@@ -1160,7 +1162,7 @@ evas_cache_image_load_data(Image_Entry *im)
evas_async_events_process();
LKL(wakeup);
- while (im->preload)
+ while (!im->flags.load_worked)
{
eina_condition_wait(&cond_wakeup);
LKU(wakeup);
diff --git a/src/lib/evas/include/evas_common_private.h b/src/lib/evas/include/evas_common_private.h
index 3409e92ee9..1833d54e31 100644
--- a/src/lib/evas/include/evas_common_private.h
+++ b/src/lib/evas/include/evas_common_private.h
@@ -568,6 +568,7 @@ struct _Image_Entry_Flags
Eina_Bool updated_data : 1;
Eina_Bool flipped : 1;
Eina_Bool textured : 1;
+ Eina_Bool load_worked : 1;
};
struct _Image_Entry_Frame