forked from enlightenment/efl
ecore: Lock in ecore_shutdown
Avoid unbalanced locks when calling event-free callbacks. Signed-off-by: Mike McCormack <mj.mccormack@samsung.com> SVN revision: 62348
This commit is contained in:
parent
e1b75002f0
commit
0fad5661b0
|
@ -177,8 +177,12 @@ ecore_init(void)
|
||||||
EAPI int
|
EAPI int
|
||||||
ecore_shutdown(void)
|
ecore_shutdown(void)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* take a lock here because _ecore_event_shutdown() does callbacks
|
||||||
|
*/
|
||||||
|
_ecore_lock();
|
||||||
if (--_ecore_init_count != 0)
|
if (--_ecore_init_count != 0)
|
||||||
return _ecore_init_count;
|
goto unlock;
|
||||||
|
|
||||||
ecore_pipe_del(_thread_call);
|
ecore_pipe_del(_thread_call);
|
||||||
eina_lock_free(&_thread_safety);
|
eina_lock_free(&_thread_safety);
|
||||||
|
@ -217,6 +221,8 @@ ecore_shutdown(void)
|
||||||
#ifdef HAVE_EVIL
|
#ifdef HAVE_EVIL
|
||||||
evil_shutdown();
|
evil_shutdown();
|
||||||
#endif
|
#endif
|
||||||
|
unlock:
|
||||||
|
_ecore_unlock();
|
||||||
|
|
||||||
return _ecore_init_count;
|
return _ecore_init_count;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue