aboutsummaryrefslogtreecommitdiff
path: root/nptl/sysdeps/i386/i686/pthread_spin_trylock.S
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/sysdeps/i386/i686/pthread_spin_trylock.S')
-rw-r--r--nptl/sysdeps/i386/i686/pthread_spin_trylock.S25
1 files changed, 2 insertions, 23 deletions
diff --git a/nptl/sysdeps/i386/i686/pthread_spin_trylock.S b/nptl/sysdeps/i386/i686/pthread_spin_trylock.S
index 2ab83e6969..a5d861f92d 100644
--- a/nptl/sysdeps/i386/i686/pthread_spin_trylock.S
+++ b/nptl/sysdeps/i386/i686/pthread_spin_trylock.S
@@ -17,26 +17,5 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#define EBUSY 16
-
-
-#ifdef UP
-# define LOCK
-#else
-# define LOCK lock
-#endif
-
- .globl pthread_spin_trylock
- .type pthread_spin_trylock,@function
- .align 16
-pthread_spin_trylock:
- movl 4(%esp), %edx
- movl $1, %eax
- xorl %ecx, %ecx
- LOCK
- cmpxchgl %ecx, (%edx)
- movl $EBUSY, %edx
- movl %ecx, %eax
- cmovne %edx, %eax
- ret
- .size pthread_spin_trylock,.-pthread_spin_trylock
+#define HAVE_CMOV 1
+#include "../i486/pthread_spin_trylock.S"