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

Function choosethread_panic

freebsd/kern/kern_switch.c:158–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156 */
157
158static __noinline struct thread *
159choosethread_panic(struct thread *td)
160{
161
162 /*
163 * If we are in panic, only allow system threads,
164 * plus the one we are running in, to be run.
165 */
166retry:
167 if (((td->td_proc->p_flag & P_SYSTEM) == 0 &&
168 (td->td_flags & TDF_INPANIC) == 0)) {
169 /* note that it is no longer on the run queue */
170 TD_SET_CAN_RUN(td);
171 td = sched_choose();
172 goto retry;
173 }
174
175 TD_SET_RUNNING(td);
176 return (td);
177}
178
179struct thread *
180choosethread(void)

Callers 1

choosethreadFunction · 0.85

Calls 1

sched_chooseFunction · 0.70

Tested by

no test coverage detected