5 #include "xlat/schedulers.h"
6 #include "xlat/sched_flags.h"
8 SYS_FUNC(sched_getscheduler)
11 tprintf("%d", (int) tcp->u_arg[0]);
12 } else if (!syserror(tcp)) {
13 tcp->auxstr = xlookup(schedulers, tcp->u_rval);
14 if (tcp->auxstr != NULL)
20 SYS_FUNC(sched_setscheduler)
22 tprintf("%d, ", (int) tcp->u_arg[0]);
23 printxval(schedulers, tcp->u_arg[1], "SCHED_???");
25 printnum_int(tcp, tcp->u_arg[2], "%d");
30 SYS_FUNC(sched_getparam)
33 tprintf("%d, ", (int) tcp->u_arg[0]);
35 printnum_int(tcp, tcp->u_arg[1], "%d");
39 SYS_FUNC(sched_setparam)
41 tprintf("%d, ", (int) tcp->u_arg[0]);
42 printnum_int(tcp, tcp->u_arg[1], "%d");
47 SYS_FUNC(sched_get_priority_min)
49 printxval(schedulers, tcp->u_arg[0], "SCHED_???");
54 SYS_FUNC(sched_rr_get_interval)
57 tprintf("%d, ", (int) tcp->u_arg[0]);
60 printaddr(tcp->u_arg[1]);
62 print_timespec(tcp, tcp->u_arg[1]);
68 print_sched_attr(struct tcb *tcp, const long addr, unsigned int size)
72 uint32_t sched_policy;
75 uint32_t sched_priority;
76 uint64_t sched_runtime;
77 uint64_t sched_deadline;
78 uint64_t sched_period;
81 if (size > sizeof(attr))
83 if (umoven_or_printaddr(tcp, addr, size, &attr))
86 tprintf("{size=%u, sched_policy=", attr.size);
87 printxval(schedulers, attr.sched_policy, "SCHED_???");
88 tprints(", sched_flags=");
89 printflags(sched_flags, attr.sched_flags, "SCHED_FLAG_???");
90 tprintf(", sched_nice=%d", attr.sched_nice);
91 tprintf(", sched_priority=%u", attr.sched_priority);
92 tprintf(", sched_runtime=%" PRIu64, attr.sched_runtime);
93 tprintf(", sched_deadline=%" PRIu64, attr.sched_deadline);
94 tprintf(", sched_period=%" PRIu64 "}", attr.sched_period);
97 SYS_FUNC(sched_setattr)
99 tprintf("%d, ", (int) tcp->u_arg[0]);
100 print_sched_attr(tcp, tcp->u_arg[1], 0x100);
101 tprintf(", %u", (unsigned int) tcp->u_arg[2]);
106 SYS_FUNC(sched_getattr)
109 tprintf("%d, ", (int) tcp->u_arg[0]);
111 print_sched_attr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
113 (unsigned int) tcp->u_arg[2],
114 (unsigned int) tcp->u_arg[3]);