clarify the purpose of this project
[nyanglibc.git] / nptl / pthread_spin_lock.s
blob7e37b0322f5e94c6140c9cec9303e26fd163d663
1 .globl pthread_spin_lock
2 .type pthread_spin_lock,@function
3 .align 1<<4
4 pthread_spin_lock:
5 1: LOCK
6 decl 0(%rdi)
7 jne 2f
8 xor %eax, %eax
9 ret
10 .align 16
11 2: rep
12 nop
13 cmpl $0, 0(%rdi)
14 jg 1b
15 jmp 2b
16 .size pthread_spin_lock,.-pthread_spin_lock