jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a1a1a931755b448aeaa6b7307ce4beca674ef074
commit a1a1a931755b448aeaa6b7307ce4beca674ef074 Author: Jean-Philippe Andre <[email protected]> Date: Tue Jul 28 15:49:47 2015 +0900 Ecore: Fix invalid lock count if DEBUG is enabled With -DDEBUG, we can see an error message, like: ERR: You are calling _ecore_lock() from outside of the main loop threads in lib/ecore/ecore_private at line 306 Looking at the code shows that ecore_lock fails immediately if thread debugging is enabled, but ecore_unlock does not, so the value _ecore_main_lock_count could go below 0. This is not very important as the value is never used. --- src/lib/ecore/ecore_private.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/ecore/ecore_private.h b/src/lib/ecore/ecore_private.h index 89f6013..a8676a2 100644 --- a/src/lib/ecore/ecore_private.h +++ b/src/lib/ecore/ecore_private.h @@ -312,6 +312,10 @@ _ecore_lock(void) static inline void _ecore_unlock(void) { +#ifndef HAVE_THREAD_SAFETY + /* see _ecore_lock(); no-op unless EINA_HAVE_DEBUG_THREADS is defined */ + EINA_MAIN_LOOP_CHECK_RETURN; +#endif _ecore_main_lock_count--; /* assert(_ecore_main_lock_count == 0); */ #ifdef HAVE_THREAD_SAFETY --
