| 139 | } |
| 140 | |
| 141 | int |
| 142 | ksched_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 |
no test coverage detected