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