projects
/
kopensolaris-gnu
/
glibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b521f2
)
(pthread_spin_trylock): Add missing lock prefix. Minute optimization.
author
drepper
<drepper>
Wed, 27 Nov 2002 23:53:11 +0000
(23:53 +0000)
committer
drepper
<drepper>
Wed, 27 Nov 2002 23:53:11 +0000
(23:53 +0000)
nptl/sysdeps/i386/i686/pthread_spin_trylock.S
patch
|
blob
|
history
diff --git
a/nptl/sysdeps/i386/i686/pthread_spin_trylock.S
b/nptl/sysdeps/i386/i686/pthread_spin_trylock.S
index
881976c
..
2ab83e6
100644
(file)
--- a/
nptl/sysdeps/i386/i686/pthread_spin_trylock.S
+++ b/
nptl/sysdeps/i386/i686/pthread_spin_trylock.S
@@
-19,6
+19,13
@@
#define EBUSY 16
+
+#ifdef UP
+# define LOCK
+#else
+# define LOCK lock
+#endif
+
.globl pthread_spin_trylock
.type pthread_spin_trylock,@function
.align 16
@@
-26,9
+33,10
@@
pthread_spin_trylock:
movl 4(%esp), %edx
movl $1, %eax
xorl %ecx, %ecx
+ LOCK
cmpxchgl %ecx, (%edx)
- movl $EBUSY, %e
c
x
- movl
$0
, %eax
- cmovne %e
c
x, %eax
+ movl $EBUSY, %e
d
x
+ movl
%ecx
, %eax
+ cmovne %e
d
x, %eax
ret
.size pthread_spin_trylock,.-pthread_spin_trylock