clarify the purpose of this project
[nyanglibc.git] / nptl / pthread_attr_setschedparam.s
blob15fdbf3609351d68a6b5840aea86ce9e1715727b
1 .text
2 .p2align 4,,15
3 .globl __pthread_attr_setschedparam
4 .type __pthread_attr_setschedparam, @function
5 __pthread_attr_setschedparam:
6 pushq %r14
7 pushq %r13
8 movq %rsi, %r13
9 pushq %r12
10 pushq %rbp
11 pushq %rbx
12 movl 4(%rdi), %ebp
13 movq %rdi, %rbx
14 movl (%rsi), %r14d
15 movl %ebp, %edi
16 call __sched_get_priority_min
17 movl %ebp, %edi
18 movl %eax, %r12d
19 call __sched_get_priority_max
20 testl %r12d, %r12d
21 js .L4
22 testl %eax, %eax
23 js .L4
24 cmpl %r12d, %r14d
25 jl .L4
26 cmpl %eax, %r14d
27 jg .L4
28 movl 0(%r13), %eax
29 orl $32, 8(%rbx)
30 movl %eax, (%rbx)
31 xorl %eax, %eax
32 popq %rbx
33 popq %rbp
34 popq %r12
35 popq %r13
36 popq %r14
37 ret
38 .p2align 4,,10
39 .p2align 3
40 .L4:
41 popq %rbx
42 movl $22, %eax
43 popq %rbp
44 popq %r12
45 popq %r13
46 popq %r14
47 ret
48 .size __pthread_attr_setschedparam, .-__pthread_attr_setschedparam
49 .globl pthread_attr_setschedparam
50 .set pthread_attr_setschedparam,__pthread_attr_setschedparam
51 .hidden __sched_get_priority_max
52 .hidden __sched_get_priority_min