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