summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@free.fr>2014-02-27 12:24:28 -0300
committerCedric Bail <cedric.bail@free.fr>2014-02-27 12:25:52 -0300
commited96f196ebc0860af4552e38b1bb5e738d73ed28 (patch)
tree69b21082e2577fc14c06643d02128bbe1c7e42e6
parent69e47a5407600b034731cb0bfa46895acfea65b6 (diff)
ecore: @fix race condition when using ecore_main_loop_thread_safe_call_sync.
-rw-r--r--src/lib/ecore/ecore.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c
index 58702060ee..6e35fe6953 100644
--- a/src/lib/ecore/ecore.c
+++ b/src/lib/ecore/ecore.c
@@ -616,9 +616,8 @@ ecore_main_loop_thread_safe_call_sync(Ecore_Data_Cb callback,
616 order->sync = EINA_TRUE; 616 order->sync = EINA_TRUE;
617 order->suspend = EINA_FALSE; 617 order->suspend = EINA_FALSE;
618 618
619 _ecore_main_loop_thread_safe_call(order);
620
621 eina_lock_take(&order->m); 619 eina_lock_take(&order->m);
620 _ecore_main_loop_thread_safe_call(order);
622 eina_condition_wait(&order->c); 621 eina_condition_wait(&order->c);
623 eina_lock_release(&order->m); 622 eina_lock_release(&order->m);
624 623
@@ -1029,7 +1028,9 @@ _ecore_main_call_flush(void)
1029 else if (call->sync) 1028 else if (call->sync)
1030 { 1029 {
1031 call->data = call->cb.sync(call->data); 1030 call->data = call->cb.sync(call->data);
1031 eina_lock_take(&call->m);
1032 eina_condition_broadcast(&call->c); 1032 eina_condition_broadcast(&call->c);
1033 eina_lock_release(&call->m);
1033 } 1034 }
1034 else 1035 else
1035 { 1036 {