From 3506ddf4ac81bfe26622263a9ac0b8282f21a568 Mon Sep 17 00:00:00 2001 From: mike_m Date: Fri, 7 Oct 2011 05:56:43 +0000 Subject: [PATCH] Revert "[Eina] Use Eina_Lock and not pthread. Fix compilation on Windows." MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This reverts commit 61d2367bd6f7c12be7e04b58cbe1011971b7a0f2. (@63877) Reverted due to the following build failure: eina_main.c:117:16: error: conflicting types for ‘_eina_tracking_lock’ ../../src/include/eina_inline_lock_posix.x:83:29: note: previous declaration of ‘_eina_tracking_lock’ was here make[3]: *** [libeina_la-eina_main.lo] Error 1 _eina_tracking_lock is used for implementation of Eina_Locks, so cannot be an Eina_Lock Signed-off-by: Mike McCormack git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/eina@63904 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/eina_main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib/eina_main.c b/src/lib/eina_main.c index 229704b..30e2302 100644 --- a/src/lib/eina_main.c +++ b/src/lib/eina_main.c @@ -114,7 +114,7 @@ static int _mt_enabled = 0; #ifdef EFL_HAVE_THREADS EAPI int _eina_threads_debug = 0; -EAPI Eina_Lock _eina_tracking_lock; +EAPI pthread_mutex_t _eina_tracking_lock; EAPI Eina_Inlist *_eina_tracking = NULL; #endif @@ -263,7 +263,7 @@ eina_init(void) #endif #ifdef EINA_HAVE_DEBUG_THREADS - eina_lock_new(&_eina_tracking_lock); + pthread_mutex_init(&_eina_tracking_lock, NULL); if (getenv("EINA_DEBUG_THREADS")) _eina_threads_debug = atoi(getenv("EINA_DEBUG_THREADS")); @@ -294,7 +294,7 @@ eina_shutdown(void) _eina_shutdown_from_desc(_eina_desc_setup + _eina_desc_setup_len); #ifdef EINA_HAVE_DEBUG_THREADS - eina_lock_free(&_eina_tracking_lock); + pthread_mutex_destroy(&_eina_tracking_lock); #endif #ifdef MT if (_mt_enabled) @@ -353,7 +353,7 @@ eina_threads_shutdown(void) return ret; #ifdef EINA_HAVE_DEBUG_THREADS - eina_lock_take(&_eina_tracking_lock); + pthread_mutex_lock(&_eina_tracking_lock); if (_eina_tracking) { fprintf(stderr, "*************************\n"); @@ -365,7 +365,7 @@ eina_threads_shutdown(void) fprintf(stderr, "*************************\n"); abort(); } - eina_lock_release(&_eina_tracking_lock); + pthread_mutex_unlock(&_eina_tracking_lock); #endif eina_share_common_threads_shutdown(); -- 2.7.4