MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ksched_getparam

Function ksched_getparam

freebsd/kern/ksched.c:141–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139}
140
141int
142ksched_getparam(struct ksched *ksched, struct thread *td,
143 struct sched_param *param)
144{
145 struct rtprio rtp;
146
147 pri_to_rtp(td, &rtp);
148 if (RTP_PRIO_IS_REALTIME(rtp.type))
149 param->sched_priority = rtpprio_to_p4prio(rtp.prio);
150 else {
151 if (PRI_MIN_TIMESHARE < rtp.prio)
152 /*
153 * The interactive score has it to min realtime
154 * so we must show max (64 most likely).
155 */
156 param->sched_priority = PRI_MAX_TIMESHARE -
157 PRI_MIN_TIMESHARE;
158 else
159 param->sched_priority = tsprio_to_p4prio(rtp.prio);
160 }
161 return (0);
162}
163
164/*
165 * XXX The priority and scheduler modifications should

Callers 1

kern_sched_getparamFunction · 0.85

Calls 1

pri_to_rtpFunction · 0.85

Tested by

no test coverage detected