Lines Matching refs:newtd
195 struct thread *newtd;
230 error = kern_thr_alloc(p, 0, &newtd);
234 bzero(&newtd->td_startzero,
236 bcopy(&td->td_startcopy, &newtd->td_startcopy,
238 newtd->td_proc = td->td_proc;
239 newtd->td_rb_list = newtd->td_rbp_list = newtd->td_rb_inact = 0;
240 thread_cow_get(newtd, td);
242 cpu_copy_thread(newtd, td);
244 error = initialize_thread(newtd, thunk);
246 thread_cow_free(newtd);
247 thread_free(newtd);
253 thread_link(newtd, p);
254 bcopy(p->p_comm, newtd->td_name, sizeof(newtd->td_name));
257 sched_fork_thread(td, newtd);
260 ast_sched(newtd, TDA_SUSPEND);
262 newtd->td_dbgflags |= TDB_BORN;
267 PMC_CALL_HOOK(newtd, PMC_FN_THR_CREATE, NULL);
269 PMC_CALL_HOOK_UNLOCKED(newtd, PMC_FN_THR_CREATE_LOG, NULL);
272 tidhash_add(newtd);
277 rtp_to_pri(rtp, newtd);
279 thread_lock(newtd);
280 TD_SET_CAN_RUN(newtd);
281 sched_add(newtd, SRQ_BORING);