Lines Matching defs:newtd
944 sched_switch(struct thread *td, struct thread *newtd, int flags)
996 if (newtd) {
1005 KASSERT((newtd->td_inhibitors == 0),
1007 newtd->td_flags |= TDF_DIDRUN;
1008 TD_SET_RUNNING(newtd);
1009 if ((newtd->td_flags & TDF_NOLOAD) == 0)
1012 newtd = choosethread();
1013 MPASS(newtd->td_lock == &sched_lock);
1026 if (td != newtd) {
1032 SDT_PROBE2(sched, , , off__cpu, newtd, newtd->td_proc);
1043 (*dtrace_vtime_switch_func)(newtd);
1046 cpu_switch(td, newtd, tmtx != NULL ? tmtx : td->td_lock);