summaryrefslogtreecommitdiff
path: root/src/lib/ecore/ecore_idle_enterer.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2016-01-14 14:52:37 -0800
committerCedric BAIL <cedric@osg.samsung.com>2016-02-02 10:45:42 -0800
commit8cc6c7561a780083c7ca5ae968f62ed09e8d2dd6 (patch)
treebe85bf8d538acecb3ebbd1f5914c52360f16898d /src/lib/ecore/ecore_idle_enterer.c
parentc95350016dd04ecd1bd514a73af862f36ae7f39e (diff)
ecore: remove useless ecore_lock/unlock.
Diffstat (limited to 'src/lib/ecore/ecore_idle_enterer.c')
-rw-r--r--src/lib/ecore/ecore_idle_enterer.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/lib/ecore/ecore_idle_enterer.c b/src/lib/ecore/ecore_idle_enterer.c
index c4091ee..6c40158 100644
--- a/src/lib/ecore/ecore_idle_enterer.c
+++ b/src/lib/ecore/ecore_idle_enterer.c
@@ -68,13 +68,9 @@ ecore_idle_enterer_add(Ecore_Task_Cb func,
68EOLIAN static void 68EOLIAN static void
69_ecore_idle_enterer_after_constructor(Eo *obj, Ecore_Idle_Enterer_Data *ie, Ecore_Task_Cb func, const void *data) 69_ecore_idle_enterer_after_constructor(Eo *obj, Ecore_Idle_Enterer_Data *ie, Ecore_Task_Cb func, const void *data)
70{ 70{
71 _ecore_lock(); 71 if (!_ecore_idle_enterer_add(obj, ie, func, data)) return;
72 if (!_ecore_idle_enterer_add(obj, ie, func, data)) goto unlock;
73 72
74 idle_enterers = (Ecore_Idle_Enterer_Data *)eina_inlist_append(EINA_INLIST_GET(idle_enterers), EINA_INLIST_GET(ie)); 73 idle_enterers = (Ecore_Idle_Enterer_Data *)eina_inlist_append(EINA_INLIST_GET(idle_enterers), EINA_INLIST_GET(ie));
75
76unlock:
77 _ecore_unlock();
78} 74}
79 75
80EAPI Ecore_Idle_Enterer * 76EAPI Ecore_Idle_Enterer *
@@ -89,27 +85,18 @@ ecore_idle_enterer_before_add(Ecore_Task_Cb func,
89EOLIAN static void 85EOLIAN static void
90_ecore_idle_enterer_before_constructor(Eo *obj, Ecore_Idle_Enterer_Data *ie, Ecore_Task_Cb func, const void *data) 86_ecore_idle_enterer_before_constructor(Eo *obj, Ecore_Idle_Enterer_Data *ie, Ecore_Task_Cb func, const void *data)
91{ 87{
92 _ecore_lock(); 88 if (!_ecore_idle_enterer_add(obj, ie, func, data)) return;
93 if (!_ecore_idle_enterer_add(obj, ie, func, data)) goto unlock;
94 89
95 idle_enterers = (Ecore_Idle_Enterer_Data *)eina_inlist_prepend(EINA_INLIST_GET(idle_enterers), EINA_INLIST_GET(ie)); 90 idle_enterers = (Ecore_Idle_Enterer_Data *)eina_inlist_prepend(EINA_INLIST_GET(idle_enterers), EINA_INLIST_GET(ie));
96
97unlock:
98 _ecore_unlock();
99} 91}
100 92
101EAPI void * 93EAPI void *
102ecore_idle_enterer_del(Ecore_Idle_Enterer *idle_enterer) 94ecore_idle_enterer_del(Ecore_Idle_Enterer *idle_enterer)
103{ 95{
104 void *data = NULL;
105
106 if (!idle_enterer) return NULL; 96 if (!idle_enterer) return NULL;
107 EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL); 97 EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
108 98
109 _ecore_lock(); 99 return _ecore_idle_enterer_del(idle_enterer);
110 data = _ecore_idle_enterer_del(idle_enterer);
111 _ecore_unlock();
112 return data;
113} 100}
114 101
115static void * 102static void *