int ksched_getparam(register_t *ret, struct ksched *ksched, struct proc *p, struct sched_param *param) { if (RTP_PRIO_IS_REALTIME(p->p_rtprio.type)) param->sched_priority = rtpprio_to_p4prio(p->p_rtprio.prio); return 0; }
int ksched_getparam(struct ksched *ksched, struct thread *td, struct sched_param *param) { struct rtprio rtp; pri_to_rtp(td, &rtp); if (RTP_PRIO_IS_REALTIME(rtp.type)) param->sched_priority = rtpprio_to_p4prio(rtp.prio); else { if (PRI_MIN_TIMESHARE < rtp.prio) /* * The interactive score has it to min realtime * so we must show max (64 most likely */ param->sched_priority = (PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE); else param->sched_priority = tsprio_to_p4prio(rtp.prio); } return 0; }