clarify the purpose of this project
[nyanglibc.git] / nptl / cancellation.shared.s
blob6ef4426db4b07f583171e23fdc25e2855be31816
1 .text
2 .p2align 4,,15
3 .globl __pthread_enable_asynccancel
4 .hidden __pthread_enable_asynccancel
5 .type __pthread_enable_asynccancel, @function
6 __pthread_enable_asynccancel:
7 movq %fs:16, %rsi
8 #APP
9 # 35 "cancellation.c" 1
10 movl %fs:776,%edx
11 # 0 "" 2
12 #NO_APP
13 .L3:
14 movl %edx, %ecx
15 orl $2, %ecx
16 cmpl %ecx, %edx
17 je .L1
18 movl %edx, %eax
19 lock cmpxchgl %ecx, 776(%rsi)
20 cmpl %eax, %edx
21 jne .L5
22 andl $-69, %ecx
23 cmpl $10, %ecx
24 je .L10
25 .L1:
26 movl %edx, %eax
27 ret
28 .p2align 4,,10
29 .p2align 3
30 .L5:
31 movl %eax, %edx
32 jmp .L3
33 .L10:
34 subq $8, %rsp
35 #APP
36 # 50 "cancellation.c" 1
37 movq $-1,%fs:1584
38 # 0 "" 2
39 #NO_APP
40 movq %fs:16, %rax
41 #APP
42 # 304 "pthreadP.h" 1
43 lock;orl $16, 776(%rax)
44 # 0 "" 2
45 # 307 "pthreadP.h" 1
46 movq %fs:768,%rdi
47 # 0 "" 2
48 #NO_APP
49 call __GI___pthread_unwind
50 .size __pthread_enable_asynccancel, .-__pthread_enable_asynccancel
51 .section .rodata.str1.8,"aMS",@progbits,1
52 .align 8
53 .LC0:
54 .string "The futex facility returned an unexpected error code.\n"
55 .text
56 .p2align 4,,15
57 .globl __pthread_disable_asynccancel
58 .hidden __pthread_disable_asynccancel
59 .type __pthread_disable_asynccancel, @function
60 __pthread_disable_asynccancel:
61 andl $2, %edi
62 jne .L21
63 #APP
64 # 78 "cancellation.c" 1
65 movl %fs:776,%ecx
66 # 0 "" 2
67 #NO_APP
68 movq %fs:16, %rax
69 leaq 776(%rax), %r8
70 .L13:
71 movl %ecx, %edx
72 movl %ecx, %eax
73 andl $-3, %edx
74 lock cmpxchgl %edx, (%r8)
75 cmpl %eax, %ecx
76 jne .L17
77 andl $12, %ecx
78 cmpl $4, %ecx
79 je .L24
80 .L21:
81 rep ret
82 .p2align 4,,10
83 .p2align 3
84 .L24:
85 pushq %rbx
86 movl $202, %r9d
87 movl $1, %ebx
88 .L16:
89 xorl %r10d, %r10d
90 movl $128, %esi
91 movq %r8, %rdi
92 movl %r9d, %eax
93 #APP
94 # 146 "../sysdeps/nptl/futex-internal.h" 1
95 syscall
97 # 0 "" 2
98 #NO_APP
99 cmpq $-4096, %rax
100 ja .L25
101 .L14:
102 #APP
103 # 102 "cancellation.c" 1
104 movl %fs:776,%edx
105 # 0 "" 2
106 #NO_APP
107 movl %edx, %eax
108 andl $12, %eax
109 cmpl $4, %eax
110 je .L16
111 popq %rbx
113 .p2align 4,,10
114 .p2align 3
115 .L17:
116 movl %eax, %ecx
117 jmp .L13
118 .L25:
119 leal 11(%rax), %ecx
120 cmpl $11, %ecx
121 ja .L15
122 movq %rbx, %rax
123 salq %cl, %rax
124 testl $2177, %eax
125 jne .L14
126 .L15:
127 leaq .LC0(%rip), %rdi
128 call __libc_fatal@PLT
129 .size __pthread_disable_asynccancel, .-__pthread_disable_asynccancel