Lines Matching defs:newtd
947 sched_switch(struct thread *td, struct thread *newtd, int flags)
999 if (newtd) {
1008 KASSERT((newtd->td_inhibitors == 0),
1010 newtd->td_flags |= TDF_DIDRUN;
1011 TD_SET_RUNNING(newtd);
1012 if ((newtd->td_flags & TDF_NOLOAD) == 0)
1015 newtd = choosethread();
1016 MPASS(newtd->td_lock == &sched_lock);
1029 if (td != newtd) {
1035 SDT_PROBE2(sched, , , off__cpu, newtd, newtd->td_proc);
1046 (*dtrace_vtime_switch_func)(newtd);
1049 cpu_switch(td, newtd, tmtx != NULL ? tmtx : td->td_lock);