about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/powerpc/elision-trylock.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/powerpc/elision-trylock.c')
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/elision-trylock.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/elision-trylock.c b/sysdeps/unix/sysv/linux/powerpc/elision-trylock.c
index 440939cda1..6f61eba48e 100644
--- a/sysdeps/unix/sysv/linux/powerpc/elision-trylock.c
+++ b/sysdeps/unix/sysv/linux/powerpc/elision-trylock.c
@@ -44,8 +44,12 @@ __lll_trylock_elision (int *futex, short *adapt_count)
       if (*futex == 0)
 	return 0;
 
-      /* Lock was busy.  Fall back to normal locking.  */
-      __builtin_tabort (_ABORT_LOCK_BUSY);
+      /* Lock was busy.  This is never a nested transaction.
+         End it, and set the adapt count.  */
+      __builtin_tend (0);
+
+      if (aconf.skip_lock_busy > 0)
+	*adapt_count = aconf.skip_lock_busy;
     }
   else
     {
@@ -57,9 +61,6 @@ __lll_trylock_elision (int *futex, short *adapt_count)
 	  if (aconf.skip_trylock_internal_abort > 0)
 	    *adapt_count = aconf.skip_trylock_internal_abort;
 	}
-
-	if (aconf.skip_lock_busy > 0)
-	  *adapt_count = aconf.skip_lock_busy;
     }
 
 use_lock: