summaryrefslogtreecommitdiff
path: root/src
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 /src
parent48461bb94621b7cbc366a00c9f44ccc95d971ba6 (diff)
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>
Diffstat (limited to 'src')
-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 e1f8c69..49b1976 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)
330 current = data; 330 current = data;
331 331
332 SLKL(current->lock); 332 SLKL(current->lock);
333 current->flags.load_worked = 0;
333 pchannel = current->channel; 334 pchannel = current->channel;
334 current->channel++; 335 current->channel++;
335 cache = current->cache; 336 cache = current->cache;
@@ -373,6 +374,7 @@ _evas_cache_image_async_heavy(void *data)
373 current->flags.preload_done = 0; 374 current->flags.preload_done = 0;
374 } 375 }
375 SLKU(current->lock_cancel); 376 SLKU(current->lock_cancel);
377 current->flags.load_worked = 1;
376 SLKU(current->lock); 378 SLKU(current->lock);
377} 379}
378 380
@@ -1160,7 +1162,7 @@ evas_cache_image_load_data(Image_Entry *im)
1160 evas_async_events_process(); 1162 evas_async_events_process();
1161 1163
1162 LKL(wakeup); 1164 LKL(wakeup);
1163 while (im->preload) 1165 while (!im->flags.load_worked)
1164 { 1166 {
1165 eina_condition_wait(&cond_wakeup); 1167 eina_condition_wait(&cond_wakeup);
1166 LKU(wakeup); 1168 LKU(wakeup);
diff --git a/src/lib/evas/include/evas_common_private.h b/src/lib/evas/include/evas_common_private.h
index 3409e92..1833d54 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
568 Eina_Bool updated_data : 1; 568 Eina_Bool updated_data : 1;
569 Eina_Bool flipped : 1; 569 Eina_Bool flipped : 1;
570 Eina_Bool textured : 1; 570 Eina_Bool textured : 1;
571 Eina_Bool load_worked : 1;
571}; 572};
572 573
573struct _Image_Entry_Frame 574struct _Image_Entry_Frame