clarify the purpose of this project
[nyanglibc.git] / nptl / tcdrain.s
bloba706f8869becba70b5e0440cc9d9f1a99ed57e6c
1 .text
2 .p2align 4,,15
3 .globl __libc_tcdrain
4 .type __libc_tcdrain, @function
5 __libc_tcdrain:
6 #APP
7 # 28 "../sysdeps/unix/sysv/linux/tcdrain.c" 1
8 movl %fs:24,%eax
9 # 0 "" 2
10 #NO_APP
11 testl %eax, %eax
12 jne .L2
13 movl $1, %edx
14 movl $21513, %esi
15 movl $16, %eax
16 #APP
17 # 28 "../sysdeps/unix/sysv/linux/tcdrain.c" 1
18 syscall
20 # 0 "" 2
21 #NO_APP
22 cmpq $-4096, %rax
23 ja .L11
24 rep ret
25 .p2align 4,,10
26 .p2align 3
27 .L2:
28 pushq %rbx
29 movl %edi, %ebx
30 subq $16, %rsp
31 call __pthread_enable_asynccancel@PLT
32 movl $1, %edx
33 movl %eax, %r8d
34 movl $21513, %esi
35 movl %ebx, %edi
36 movl $16, %eax
37 #APP
38 # 28 "../sysdeps/unix/sysv/linux/tcdrain.c" 1
39 syscall
41 # 0 "" 2
42 #NO_APP
43 cmpq $-4096, %rax
44 ja .L12
45 .L6:
46 movl %r8d, %edi
47 movl %eax, 12(%rsp)
48 call __pthread_disable_asynccancel@PLT
49 movl 12(%rsp), %eax
50 addq $16, %rsp
51 popq %rbx
52 ret
53 .p2align 4,,10
54 .p2align 3
55 .L11:
56 movq errno@gottpoff(%rip), %rdx
57 negl %eax
58 movl %eax, %fs:(%rdx)
59 movl $-1, %eax
60 ret
61 .L12:
62 movq errno@gottpoff(%rip), %rdx
63 negl %eax
64 movl %eax, %fs:(%rdx)
65 movl $-1, %eax
66 jmp .L6
67 .size __libc_tcdrain, .-__libc_tcdrain
68 .weak tcdrain
69 .set tcdrain,__libc_tcdrain