| 177 | } |
| 178 | |
| 179 | struct thread * |
| 180 | choosethread(void) |
| 181 | { |
| 182 | struct thread *td; |
| 183 | |
| 184 | td = sched_choose(); |
| 185 | |
| 186 | if (KERNEL_PANICKED()) |
| 187 | return (choosethread_panic(td)); |
| 188 | |
| 189 | TD_SET_RUNNING(td); |
| 190 | return (td); |
| 191 | } |
| 192 | |
| 193 | /* |
| 194 | * Kernel thread preemption implementation. Critical sections mark |
no test coverage detected