summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSung-Taek Hong <sth253.hong@samsung.com>2016-01-14 14:23:03 -0800
committerCedric BAIL <cedric@osg.samsung.com>2016-01-14 14:23:06 -0800
commit5e53e4b7e1b4f1818866d55922e43834ebfe7dc7 (patch)
tree94ce5a8fcc6e753d24d36af8af9d8be9070f9fc4
parent943f2df0069cf615904c08cd92f3b72592cfafb1 (diff)
downloadefl-5e53e4b7e1b4f1818866d55922e43834ebfe7dc7.tar.gz
ecore: check eina_main_loop before lock.
Summary: - EINA_MAIN_LOOP_CHECK_RETURN should be called before ecore lock because this may return without ecore_unlock. - remove EINA_UNLIKELY(!eina_main_loop_is()) which is redundant. Reviewers: jpeg, jaehwan, cedric, raster Reviewed By: raster Subscribers: raster, conr2d, cedric, jpeg Projects: #efl Differential Revision: https://phab.enlightenment.org/D3541 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/lib/ecore/ecore_idle_exiter.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/lib/ecore/ecore_idle_exiter.c b/src/lib/ecore/ecore_idle_exiter.c
index 8fc253009e..41e5f038a8 100644
--- a/src/lib/ecore/ecore_idle_exiter.c
+++ b/src/lib/ecore/ecore_idle_exiter.c
@@ -44,13 +44,9 @@ ecore_idle_exiter_add(Ecore_Task_Cb func,
EOLIAN static void
_ecore_idle_exiter_constructor(Eo *obj, Ecore_Idle_Exiter_Data *ie, Ecore_Task_Cb func, const void *data)
{
- _ecore_lock();
- if (EINA_UNLIKELY(!eina_main_loop_is()))
- {
- EINA_MAIN_LOOP_CHECK_RETURN;
- }
-
+ EINA_MAIN_LOOP_CHECK_RETURN;
+ _ecore_lock();
ie->obj = obj;
eo_manual_free_set(obj, EINA_TRUE);