clarify the purpose of this project
[nyanglibc.git] / nptl / pthread_setschedprio.s
blob2b55199674aaea17d08055e00c30cce7b7d9f41f
1 .text
2 .p2align 4,,15
3 .globl pthread_setschedprio
4 .type pthread_setschedprio, @function
5 pthread_setschedprio:
6 movl 720(%rdi), %eax
7 testl %eax, %eax
8 jle .L7
9 pushq %r12
10 pushq %rbp
11 leaq 1560(%rdi), %rbp
12 pushq %rbx
13 movl %esi, %r12d
14 movq %rdi, %rbx
15 xorl %eax, %eax
16 movl $1, %edx
17 subq $16, %rsp
18 movl %esi, 12(%rsp)
19 lock cmpxchgl %edx, 0(%rbp)
20 jne .L16
21 .L3:
22 movq 1712(%rbx), %rax
23 testq %rax, %rax
24 jne .L17
25 .L4:
26 movl 720(%rbx), %edi
27 leaq 12(%rsp), %rsi
28 call sched_setparam@PLT
29 cmpl $-1, %eax
30 je .L18
31 orl $32, 780(%rbx)
32 movl %r12d, 12(%rsp)
33 xorl %r8d, %r8d
34 movl %r12d, 1592(%rbx)
35 .L6:
36 xorl %eax, %eax
37 #APP
38 # 61 "pthread_setschedprio.c" 1
39 xchgl %eax, 0(%rbp)
40 # 0 "" 2
41 #NO_APP
42 cmpl $1, %eax
43 jg .L19
44 .L1:
45 addq $16, %rsp
46 movl %r8d, %eax
47 popq %rbx
48 popq %rbp
49 popq %r12
50 ret
51 .p2align 4,,10
52 .p2align 3
53 .L7:
54 movl $3, %r8d
55 movl %r8d, %eax
56 ret
57 .p2align 4,,10
58 .p2align 3
59 .L16:
60 movq %rbp, %rdi
61 call __lll_lock_wait_private@PLT
62 jmp .L3
63 .p2align 4,,10
64 .p2align 3
65 .L17:
66 movl (%rax), %eax
67 cmpl %r12d, %eax
68 jle .L4
69 movl %eax, 12(%rsp)
70 jmp .L4
71 .p2align 4,,10
72 .p2align 3
73 .L18:
74 movq errno@gottpoff(%rip), %rax
75 movl %fs:(%rax), %r8d
76 jmp .L6
77 .p2align 4,,10
78 .p2align 3
79 .L19:
80 xorl %r10d, %r10d
81 movl $1, %edx
82 movl $129, %esi
83 movq %rbp, %rdi
84 movl $202, %eax
85 #APP
86 # 61 "pthread_setschedprio.c" 1
87 syscall
89 # 0 "" 2
90 #NO_APP
91 jmp .L1
92 .size pthread_setschedprio, .-pthread_setschedprio