clarify the purpose of this project
[nyanglibc.git] / nptl / pause.shared.s
blobd8a83ae96fa776ccb42b799d3510a60b6748f9e2
1 .text
2 .p2align 4,,15
3 .globl __libc_pause
4 .type __libc_pause, @function
5 __libc_pause:
6 #APP
7 # 29 "../sysdeps/unix/sysv/linux/pause.c" 1
8 movl %fs:24,%eax
9 # 0 "" 2
10 #NO_APP
11 testl %eax, %eax
12 jne .L2
13 movl $34, %eax
14 #APP
15 # 29 "../sysdeps/unix/sysv/linux/pause.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 subq $24, %rsp
27 call __pthread_enable_asynccancel
28 movl %eax, %edi
29 movl $34, %eax
30 #APP
31 # 29 "../sysdeps/unix/sysv/linux/pause.c" 1
32 syscall
34 # 0 "" 2
35 #NO_APP
36 cmpq $-4096, %rax
37 ja .L12
38 .L6:
39 movl %eax, 12(%rsp)
40 call __pthread_disable_asynccancel
41 movl 12(%rsp), %eax
42 addq $24, %rsp
43 ret
44 .p2align 4,,10
45 .p2align 3
46 .L11:
47 movq errno@gottpoff(%rip), %rdx
48 negl %eax
49 movl %eax, %fs:(%rdx)
50 movl $-1, %eax
51 ret
52 .L12:
53 movq errno@gottpoff(%rip), %rdx
54 negl %eax
55 movl %eax, %fs:(%rdx)
56 movl $-1, %eax
57 jmp .L6
58 .size __libc_pause, .-__libc_pause
59 .weak pause
60 .set pause,__libc_pause
61 .hidden __pthread_disable_asynccancel
62 .hidden __pthread_enable_asynccancel