From 2856074fde9b816ef2165da27fae38dcc6370c3c Mon Sep 17 00:00:00 2001 From: cedric Date: Mon, 25 Apr 2011 08:48:20 +0000 Subject: [PATCH] eina: fix eina_lock on windows. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/eina@58893 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/include/eina_inline_lock_posix.x | 6 +++--- src/include/eina_inline_lock_win32.x | 8 ++++---- src/include/eina_inline_lock_wince.x | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/include/eina_inline_lock_posix.x b/src/include/eina_inline_lock_posix.x index 8f8ac83..51733c3 100644 --- a/src/include/eina_inline_lock_posix.x +++ b/src/include/eina_inline_lock_posix.x @@ -22,7 +22,7 @@ #ifndef __USE_UNIX98 # define __USE_UNIX98 # include -# undef __USE_UNIX98 +# undef __USE_UNIX98 #else # include #endif @@ -44,10 +44,10 @@ eina_lock_new(Eina_Lock *mutex) if (pthread_mutexattr_init(&attr) != 0) return EINA_FALSE; -#ifdef PTHREAD_MUTEX_RECURSIVE +#ifdef PTHREAD_MUTEX_RECURSIVE if (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE) != 0) return EINA_FALSE; -#endif +#endif if (pthread_mutex_init(mutex, &attr) != 0) return EINA_FALSE; diff --git a/src/include/eina_inline_lock_win32.x b/src/include/eina_inline_lock_win32.x index 4d67861..114b1fe 100644 --- a/src/include/eina_inline_lock_win32.x +++ b/src/include/eina_inline_lock_win32.x @@ -23,7 +23,7 @@ typedef CRITICAL_SECTION Eina_Lock; -EAPI extern Eina_Bool _threads_activated; +EAPI extern Eina_Bool _eina_threads_activated; static inline Eina_Bool eina_lock_new(Eina_Lock *mutex) @@ -42,7 +42,7 @@ eina_lock_free(Eina_Lock *mutex) static inline Eina_Bool eina_lock_take(Eina_Lock *mutex) { - if (!_threads_activated) return EINA_FALSE; + if (!_eina_threads_activated) return EINA_FALSE; EnterCriticalSection(mutex); @@ -52,7 +52,7 @@ eina_lock_take(Eina_Lock *mutex) static inline Eina_Bool eina_lock_take_try(Eina_Lock *mutex) { - if (!_threads_activated) return EINA_FALSE; + if (!_eina_threads_activated) return EINA_FALSE; return TryEnterCriticalSection(mutex) == 0 ? EINA_FALSE : EINA_TRUE; } @@ -60,7 +60,7 @@ eina_lock_take_try(Eina_Lock *mutex) static inline Eina_Bool eina_lock_release(Eina_Lock *mutex) { - if (!_threads_activated) return EINA_FALSE; + if (!_eina_threads_activated) return EINA_FALSE; LeaveCriticalSection(mutex); diff --git a/src/include/eina_inline_lock_wince.x b/src/include/eina_inline_lock_wince.x index de21dea..57c9092 100644 --- a/src/include/eina_inline_lock_wince.x +++ b/src/include/eina_inline_lock_wince.x @@ -46,7 +46,7 @@ eina_lock_take(Eina_Lock *mutex) { DWORD res; - if (!_threads_activated) return EINA_FALSE; + if (!_eina_threads_activated) return EINA_FALSE; res = WaitForSingleObject(*mutex, INFINITE); if ((res == WAIT_ABANDONED) || (res == WAIT_FAILED)) @@ -64,7 +64,7 @@ eina_lock_take_try(Eina_Lock *mutex) static inline Eina_Bool eina_lock_release(Eina_Lock *mutex) { - if (!_threads_activated) return EINA_FALSE; + if (!_eina_threads_activated) return EINA_FALSE; return ReleaseMutex(*mutex); } -- 2.7.4