cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=68a4e85483ec50c12ef3984a33e42c3bdd373790
commit 68a4e85483ec50c12ef3984a33e42c3bdd373790 Author: Cedric Bail <[email protected]> Date: Fri Oct 11 17:28:09 2013 +0900 eina: that stuff was just for adding a bug in fact. --- src/lib/eina/eina_inline_lock_posix.x | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/lib/eina/eina_inline_lock_posix.x b/src/lib/eina/eina_inline_lock_posix.x index 4727177..2e5b038 100644 --- a/src/lib/eina/eina_inline_lock_posix.x +++ b/src/lib/eina/eina_inline_lock_posix.x @@ -600,27 +600,16 @@ static inline Eina_Lock_Result eina_spinlock_take(Eina_Spinlock *spinlock) { #ifdef EINA_HAVE_POSIX_SPINLOCK - Eina_Bool yield; int t; do { - yield = EINA_FALSE; - t = pthread_spin_trylock(spinlock); if (t != 0) { - if (errno == EBUSY) - { - sched_yield(); - yield = EINA_TRUE; - } - else if (errno == EDEADLK) - { - return EINA_LOCK_DEADLOCK; - } + if (errno == EBUSY) sched_yield(); + else if (errno == EDEADLK) return EINA_LOCK_DEADLOCK; } - - } while (t != 0 && yield); + } while (t != 0); return t ? EINA_LOCK_FAIL : EINA_LOCK_SUCCEED; #else --
