clarify the purpose of this project
[nyanglibc.git] / nptl / pthread_getschedparam.s
blobac917ebb358dff8352d3ee71c8725160790841e5
1 .text
2 .p2align 4,,15
3 .globl __pthread_getschedparam
4 .type __pthread_getschedparam, @function
5 __pthread_getschedparam:
6 movl 720(%rdi), %eax
7 testl %eax, %eax
8 jle .L15
9 pushq %r13
10 pushq %r12
11 movq %rdx, %r12
12 pushq %rbp
13 pushq %rbx
14 movq %rsi, %rbp
15 movq %rdi, %rbx
16 subq $8, %rsp
17 #APP
18 # 39 "pthread_getschedparam.c" 1
19 movl %fs:24,%eax
20 # 0 "" 2
21 #NO_APP
22 testl %eax, %eax
23 leaq 1560(%rdi), %r13
24 jne .L3
25 movl $1, %edx
26 #APP
27 # 47 "../sysdeps/unix/sysv/linux/x86/lowlevellock.h" 1
28 cmpxchgl %edx, 0(%r13)
29 # 0 "" 2
30 #NO_APP
31 .L4:
32 movl 780(%rbx), %eax
33 testb $32, %al
34 je .L26
35 .L5:
36 testb $64, %al
37 je .L27
38 .L11:
39 movl 1596(%rbx), %eax
40 xorl %r8d, %r8d
41 movl %eax, 0(%rbp)
42 movl 1592(%rbx), %eax
43 movl %eax, (%r12)
44 .L8:
45 #APP
46 # 69 "pthread_getschedparam.c" 1
47 movl %fs:24,%eax
48 # 0 "" 2
49 #NO_APP
50 testl %eax, %eax
51 jne .L9
52 subl $1, 1560(%rbx)
53 .L1:
54 addq $8, %rsp
55 movl %r8d, %eax
56 popq %rbx
57 popq %rbp
58 popq %r12
59 popq %r13
60 ret
61 .p2align 4,,10
62 .p2align 3
63 .L27:
64 movl 720(%rbx), %edi
65 call __sched_getscheduler
66 cmpl $-1, %eax
67 movl %eax, 1596(%rbx)
68 jne .L28
69 .L24:
70 movl $1, %r8d
71 jmp .L8
72 .p2align 4,,10
73 .p2align 3
74 .L26:
75 movl 720(%rbx), %edi
76 leaq 1592(%rbx), %rsi
77 call __sched_getparam
78 testl %eax, %eax
79 je .L29
80 testb $64, 780(%rbx)
81 jne .L24
82 movl 720(%rbx), %edi
83 call __sched_getscheduler
84 movl %eax, 1596(%rbx)
85 addl $1, %eax
86 je .L24
87 orl $64, 780(%rbx)
88 jmp .L24
89 .p2align 4,,10
90 .p2align 3
91 .L29:
92 movl 780(%rbx), %eax
93 orl $32, %eax
94 movl %eax, 780(%rbx)
95 jmp .L5
96 .p2align 4,,10
97 .p2align 3
98 .L15:
99 movl $3, %r8d
100 movl %r8d, %eax
102 .p2align 4,,10
103 .p2align 3
104 .L3:
105 xorl %eax, %eax
106 movl $1, %edx
107 lock cmpxchgl %edx, 0(%r13)
108 je .L4
109 movq %r13, %rdi
110 call __lll_lock_wait_private
111 jmp .L4
112 .p2align 4,,10
113 .p2align 3
114 .L9:
115 xorl %eax, %eax
116 #APP
117 # 69 "pthread_getschedparam.c" 1
118 xchgl %eax, 0(%r13)
119 # 0 "" 2
120 #NO_APP
121 cmpl $1, %eax
122 jle .L1
123 xorl %r10d, %r10d
124 movl $1, %edx
125 movl $129, %esi
126 movq %r13, %rdi
127 movl $202, %eax
128 #APP
129 # 69 "pthread_getschedparam.c" 1
130 syscall
132 # 0 "" 2
133 #NO_APP
134 jmp .L1
135 .L28:
136 orl $64, 780(%rbx)
137 jmp .L11
138 .size __pthread_getschedparam, .-__pthread_getschedparam
139 .globl pthread_getschedparam
140 .set pthread_getschedparam,__pthread_getschedparam
141 .hidden __lll_lock_wait_private
142 .hidden __sched_getparam
143 .hidden __sched_getscheduler