clarify the purpose of this project
[nyanglibc.git] / nptl / pthread_key_delete.s
blobc4e719b7fe1d6d7f4b03161e4da5a01e1ab9aead
1 .text
2 .p2align 4,,15
3 .globl __pthread_key_delete
4 .type __pthread_key_delete, @function
5 __pthread_key_delete:
6 cmpl $1023, %edi
7 ja .L4
8 movl %edi, %edi
9 leaq __pthread_keys(%rip), %rax
10 salq $4, %rdi
11 addq %rax, %rdi
12 movq (%rdi), %rdx
13 testb $1, %dl
14 je .L4
15 movl %edx, %eax
16 addl $1, %edx
17 lock cmpxchgq %rdx, (%rdi)
18 jne .L4
19 xorl %eax, %eax
20 ret
21 .p2align 4,,10
22 .p2align 3
23 .L4:
24 movl $22, %eax
25 ret
26 .size __pthread_key_delete, .-__pthread_key_delete
27 .weak pthread_key_delete
28 .set pthread_key_delete,__pthread_key_delete