clarify the purpose of this project
[nyanglibc.git] / nptl / pthread_setschedparam.shared.s
blobdb95e1e734920a48f4926052c9b6acdcb637b746
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 #NO_APP
7 .p2align 4,,15
8 .globl __pthread_setschedparam
9 .type __pthread_setschedparam, @function
10 __pthread_setschedparam:
11 movl 720(%rdi), %eax
12 testl %eax, %eax
13 jle .L9
14 pushq %r13
15 pushq %r12
16 movq %rdx, %r12
17 pushq %rbp
18 pushq %rbx
19 movl %esi, %ebp
20 movq %rdi, %rbx
21 subq $24, %rsp
22 #APP
23 # 40 "pthread_setschedparam.c" 1
24 movl %fs:24,%eax
25 # 0 "" 2
26 #NO_APP
27 testl %eax, %eax
28 leaq 1560(%rdi), %r13
29 jne .L3
30 movl $1, %edx
31 #APP
32 # 47 "../sysdeps/unix/sysv/linux/x86/lowlevellock.h" 1
33 cmpxchgl %edx, 0(%r13)
34 # 0 "" 2
35 #NO_APP
36 .L4:
37 movq 1712(%rbx), %rax
38 movq %r12, %rdx
39 testq %rax, %rax
40 jne .L18
41 .L5:
42 movl 720(%rbx), %edi
43 movl %ebp, %esi
44 call __GI___sched_setscheduler
45 cmpl $-1, %eax
46 je .L19
47 movl %ebp, 1596(%rbx)
48 movl (%r12), %eax
49 xorl %r8d, %r8d
50 orl $96, 780(%rbx)
51 movl %eax, 1592(%rbx)
52 .L7:
53 #APP
54 # 68 "pthread_setschedparam.c" 1
55 movl %fs:24,%eax
56 # 0 "" 2
57 #NO_APP
58 testl %eax, %eax
59 jne .L8
60 subl $1, 1560(%rbx)
61 .L1:
62 addq $24, %rsp
63 movl %r8d, %eax
64 popq %rbx
65 popq %rbp
66 popq %r12
67 popq %r13
68 ret
69 .p2align 4,,10
70 .p2align 3
71 .L9:
72 movl $3, %r8d
73 movl %r8d, %eax
74 ret
75 .p2align 4,,10
76 .p2align 3
77 .L3:
78 xorl %eax, %eax
79 movl $1, %edx
80 lock cmpxchgl %edx, 0(%r13)
81 je .L4
82 movq %r13, %rdi
83 call __lll_lock_wait_private
84 jmp .L4
85 .p2align 4,,10
86 .p2align 3
87 .L18:
88 movl (%rax), %eax
89 cmpl (%r12), %eax
90 jle .L5
91 movl %eax, 12(%rsp)
92 leaq 12(%rsp), %rdx
93 jmp .L5
94 .p2align 4,,10
95 .p2align 3
96 .L19:
97 movq __libc_errno@gottpoff(%rip), %rax
98 movl %fs:(%rax), %r8d
99 jmp .L7
100 .p2align 4,,10
101 .p2align 3
102 .L8:
103 xorl %eax, %eax
104 #APP
105 # 68 "pthread_setschedparam.c" 1
106 xchgl %eax, 0(%r13)
107 # 0 "" 2
108 #NO_APP
109 cmpl $1, %eax
110 jle .L1
111 xorl %r10d, %r10d
112 movl $1, %edx
113 movl $129, %esi
114 movq %r13, %rdi
115 movl $202, %eax
116 #APP
117 # 68 "pthread_setschedparam.c" 1
118 syscall
120 # 0 "" 2
121 #NO_APP
122 jmp .L1
123 .size __pthread_setschedparam, .-__pthread_setschedparam
124 .globl pthread_setschedparam
125 .set pthread_setschedparam,__pthread_setschedparam
126 .hidden __lll_lock_wait_private