From df9b464d2843f8bcf09daa5e2be1fba7851cf753 Mon Sep 17 00:00:00 2001 From: cedric Date: Mon, 9 May 2011 10:29:55 +0000 Subject: [PATCH] eina: check pending lock at the right time. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/eina@59286 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/eina_main.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/lib/eina_main.c b/src/lib/eina_main.c index d39f60b..bb60c19 100644 --- a/src/lib/eina_main.c +++ b/src/lib/eina_main.c @@ -283,7 +283,13 @@ eina_threads_shutdown(void) assert(pthread_equal(_eina_main_loop, pthread_self())); assert(_eina_main_thread_count > 0); +#endif + + ret = --_eina_main_thread_count; + if(_eina_main_thread_count > 0) + return ret; +#ifdef EINA_HAVE_DEBUG_THREADS pthread_mutex_lock(&_eina_tracking_lock); if (_eina_tracking) { @@ -297,13 +303,8 @@ eina_threads_shutdown(void) abort(); } pthread_mutex_unlock(&_eina_tracking_lock); - #endif - ret = --_eina_main_thread_count; - if(_eina_main_thread_count > 0) - return ret; - eina_share_common_threads_shutdown(); eina_log_threads_shutdown(); -- 2.7.4