clarify the purpose of this project
[nyanglibc.git] / nptl / pthread_spin_trylock.shared.s
blobdfd38289106a6b43af9d9c1eb8090e7a48a7c399
1 .globl pthread_spin_trylock
2 .type pthread_spin_trylock,@function
3 .align 1<<4
4 pthread_spin_trylock:
5 movl $1, %eax
6 xorl %ecx, %ecx
7 lock
8 cmpxchgl %ecx, (%rdi)
9 movl $16, %eax
10 cmovel %ecx, %eax
11 retq
12 .size pthread_spin_trylock,.-pthread_spin_trylock