clarify the purpose of this project
[nyanglibc.git] / nptl / pthread_attr_getstacksize.s
blob3d6cb3dfe7f2b0e208572d0688c8d250ccb33ded
1 .text
2 .p2align 4,,15
3 .globl __pthread_attr_getstacksize
4 .type __pthread_attr_getstacksize, @function
5 __pthread_attr_getstacksize:
6 pushq %rbx
7 movq 32(%rdi), %r8
8 movq %rsi, %rbx
9 testq %r8, %r8
10 je .L6
11 .L2:
12 movq %r8, (%rbx)
13 xorl %eax, %eax
14 popq %rbx
15 ret
16 .p2align 4,,10
17 .p2align 3
18 .L6:
19 xorl %eax, %eax
20 movl $1, %edx
21 lock cmpxchgl %edx, __default_pthread_attr_lock(%rip)
22 jne .L7
23 .L3:
24 movq 32+__default_pthread_attr(%rip), %r8
25 xorl %eax, %eax
26 #APP
27 # 37 "pthread_attr_getstacksize.c" 1
28 xchgl %eax, __default_pthread_attr_lock(%rip)
29 # 0 "" 2
30 #NO_APP
31 cmpl $1, %eax
32 jle .L2
33 xorl %r10d, %r10d
34 movl $1, %edx
35 movl $129, %esi
36 leaq __default_pthread_attr_lock(%rip), %rdi
37 movl $202, %eax
38 #APP
39 # 37 "pthread_attr_getstacksize.c" 1
40 syscall
42 # 0 "" 2
43 #NO_APP
44 jmp .L2
45 .p2align 4,,10
46 .p2align 3
47 .L7:
48 leaq __default_pthread_attr_lock(%rip), %rdi
49 call __lll_lock_wait_private@PLT
50 jmp .L3
51 .size __pthread_attr_getstacksize, .-__pthread_attr_getstacksize
52 .globl pthread_attr_getstacksize
53 .set pthread_attr_getstacksize,__pthread_attr_getstacksize