From: cedric Date: Wed, 7 Sep 2011 10:16:27 +0000 (+0000) Subject: eina: threads debugging back to work. X-Git-Tag: 2.0_alpha~61^2~31 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=17060ee6da0fc3d24a7dcec2b6148aa2d6492708;p=framework%2Fuifw%2Feina.git eina: threads debugging back to work. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/eina@63266 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/include/eina_inline_lock_posix.x b/src/include/eina_inline_lock_posix.x index 825edf0..f9a5666 100644 --- a/src/include/eina_inline_lock_posix.x +++ b/src/include/eina_inline_lock_posix.x @@ -102,7 +102,8 @@ eina_lock_new(Eina_Lock *mutex) pthread_mutexattr_t attr; #ifdef EINA_HAVE_DEBUG_THREADS - assert(pthread_equal(_eina_main_loop, pthread_self())); + if (!_eina_threads_activated) + assert(pthread_equal(_eina_main_loop, pthread_self())); #endif if (pthread_mutexattr_init(&attr) != 0) @@ -126,7 +127,8 @@ static inline void eina_lock_free(Eina_Lock *mutex) { #ifdef EINA_HAVE_DEBUG_THREADS - assert(pthread_equal(_eina_main_loop, pthread_self())); + if (!_eina_threads_activated) + assert(pthread_equal(_eina_main_loop, pthread_self())); #endif pthread_mutex_destroy(&(mutex->mutex)); @@ -283,7 +285,8 @@ eina_condition_new(Eina_Condition *cond, Eina_Lock *mutex) { #ifdef EINA_HAVE_DEBUG_THREADS assert(mutex != NULL); - assert(pthread_equal(_eina_main_loop, pthread_self())); + if (!_eina_threads_activated) + assert(pthread_equal(_eina_main_loop, pthread_self())); memset(cond, 0, sizeof (Eina_Condition)); #endif @@ -304,7 +307,8 @@ static inline void eina_condition_free(Eina_Condition *cond) { #ifdef EINA_HAVE_DEBUG_THREADS - assert(pthread_equal(_eina_main_loop, pthread_self())); + if (!_eina_threads_activated) + assert(pthread_equal(_eina_main_loop, pthread_self())); #endif pthread_cond_destroy(&(cond->condition)); @@ -368,7 +372,8 @@ static inline Eina_Bool eina_rwlock_new(Eina_RWLock *mutex) { #ifdef EINA_HAVE_DEBUG_THREADS - assert(pthread_equal(_eina_main_loop, pthread_self())); + if (!_eina_threads_activated) + assert(pthread_equal(_eina_main_loop, pthread_self())); #endif if (pthread_rwlock_init(&(mutex->mutex), NULL) != 0) @@ -380,7 +385,8 @@ static inline void eina_rwlock_free(Eina_RWLock *mutex) { #ifdef EINA_HAVE_DEBUG_THREADS - assert(pthread_equal(_eina_main_loop, pthread_self())); + if (!_eina_threads_activated) + assert(pthread_equal(_eina_main_loop, pthread_self())); #endif pthread_rwlock_destroy(&(mutex->mutex));