summaryrefslogtreecommitdiff
path: root/src/lib/eina/eina_inline_lock_posix.x
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/eina/eina_inline_lock_posix.x')
-rw-r--r--src/lib/eina/eina_inline_lock_posix.x8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/eina/eina_inline_lock_posix.x b/src/lib/eina/eina_inline_lock_posix.x
index 8ae3f89566..bbcd97be86 100644
--- a/src/lib/eina/eina_inline_lock_posix.x
+++ b/src/lib/eina/eina_inline_lock_posix.x
@@ -250,6 +250,10 @@ eina_lock_take(Eina_Lock *mutex)
250#endif 250#endif
251 251
252#ifdef EINA_HAVE_DEBUG_THREADS 252#ifdef EINA_HAVE_DEBUG_THREADS
253 if (eina_lock_take_try(mutex) == EINA_LOCK_SUCCEED) return EINA_LOCK_SUCCEED;
254#endif
255
256#ifdef EINA_HAVE_DEBUG_THREADS
253 if (_eina_threads_debug) 257 if (_eina_threads_debug)
254 { 258 {
255 struct timeval t0, t1; 259 struct timeval t0, t1;
@@ -654,6 +658,10 @@ eina_spinlock_take(Eina_Spinlock *spinlock)
654#if defined(EINA_HAVE_POSIX_SPINLOCK) 658#if defined(EINA_HAVE_POSIX_SPINLOCK)
655 int t; 659 int t;
656 660
661#ifdef EINA_HAVE_DEBUG_THREADS
662 if (eina_spinlock_take_try(spinlock) == EINA_LOCK_SUCCEED) return EINA_LOCK_SUCCEED;
663#endif
664
657 for (;;) 665 for (;;)
658 { 666 {
659 t = pthread_spin_lock(spinlock); 667 t = pthread_spin_lock(spinlock);