Home
last modified time | relevance | path

Searched refs:newtd (Results 1 – 11 of 11) sorted by relevance

/freebsd/sys/kern/
H A Dkern_kthread.c267 struct thread *newtd, *oldtd; in kthread_add1() local
277 newtd = thread_alloc(pages); in kthread_add1()
278 if (newtd == NULL) in kthread_add1()
293 *newtdp = newtd; in kthread_add1()
295 bzero(&newtd->td_startzero, in kthread_add1()
297 bcopy(&oldtd->td_startcopy, &newtd->td_startcopy, in kthread_add1()
301 strcpy(newtd->td_name, tdname); in kthread_add1()
303 TSTHREAD(newtd, newtd->td_name); in kthread_add1()
305 newtd->td_proc = p; /* needed for cpu_copy_thread */ in kthread_add1()
306 newtd->td_pflags |= TDP_KTHREAD; in kthread_add1()
[all …]
H A Dkern_thr.c209 struct thread *newtd; in thread_create() local
244 error = kern_thr_alloc(p, 0, &newtd); in thread_create()
248 bzero(&newtd->td_startzero, in thread_create()
250 bcopy(&td->td_startcopy, &newtd->td_startcopy, in thread_create()
252 newtd->td_proc = td->td_proc; in thread_create()
253 newtd->td_rb_list = newtd->td_rbp_list = newtd->td_rb_inact = 0; in thread_create()
254 thread_cow_get(newtd, td); in thread_create()
256 cpu_copy_thread(newtd, td); in thread_create()
258 error = initialize_thread(newtd, thunk); in thread_create()
260 thread_cow_free(newtd); in thread_create()
[all …]
H A Dsched_4bsd.c1000 struct thread *newtd; in sched_4bsd_sswitch() local
1049 newtd = choosethread(); in sched_4bsd_sswitch()
1050 MPASS(newtd->td_lock == &sched_lock); in sched_4bsd_sswitch()
1062 if (td != newtd) { in sched_4bsd_sswitch()
1070 HWT_CALL_HOOK(newtd, HWT_SWITCH_IN, NULL); in sched_4bsd_sswitch()
1073 SDT_PROBE2(sched, , , off__cpu, newtd, newtd->td_proc); in sched_4bsd_sswitch()
1084 (*dtrace_vtime_switch_func)(newtd); in sched_4bsd_sswitch()
1087 cpu_switch(td, newtd, tmtx); in sched_4bsd_sswitch()
1660 struct thread *newtd; in sched_throw_tail() local
1665 newtd = choosethread(); in sched_throw_tail()
[all …]
H A Dkern_thread.c861 thread_cow_get_proc(struct thread *newtd, struct proc *p) in thread_cow_get_proc() argument
865 newtd->td_realucred = crcowget(p->p_ucred); in thread_cow_get_proc()
866 newtd->td_ucred = newtd->td_realucred; in thread_cow_get_proc()
867 newtd->td_limit = lim_hold(p->p_limit); in thread_cow_get_proc()
868 newtd->td_cowgen = p->p_cowgen; in thread_cow_get_proc()
872 thread_cow_get(struct thread *newtd, struct thread *td) in thread_cow_get() argument
876 newtd->td_realucred = crcowget(td->td_realucred); in thread_cow_get()
877 newtd->td_ucred = newtd->td_realucred; in thread_cow_get()
878 newtd->td_limit = lim_hold(td->td_limit); in thread_cow_get()
879 newtd->td_cowgen = td->td_cowgen; in thread_cow_get()
H A Dsched_ule.c2295 struct thread *newtd; in sched_ule_sswitch() local
2379 newtd = choosethread(); in sched_ule_sswitch()
2380 sched_pctcpu_update(td_get_sched(newtd), 0); in sched_ule_sswitch()
2386 if (td != newtd) { in sched_ule_sswitch()
2391 SDT_PROBE2(sched, , , off__cpu, newtd, newtd->td_proc); in sched_ule_sswitch()
2400 (*dtrace_vtime_switch_func)(newtd); in sched_ule_sswitch()
2405 HWT_CALL_HOOK(newtd, HWT_SWITCH_IN, NULL); in sched_ule_sswitch()
2409 cpu_switch(td, newtd, mtx); in sched_ule_sswitch()
3192 struct thread *newtd; in sched_throw_grab() local
3194 newtd = choosethread(); in sched_throw_grab()
[all …]
H A Dsubr_smp.c1067 struct thread *td, *newtd; in quiesce_all_critical() local
1080 newtd = (struct thread *) in quiesce_all_critical()
1082 if (td != newtd) in quiesce_all_critical()
/freebsd/sys/compat/linux/
H A Dlinux_fork.c240 struct thread *newtd; in linux_clone_thread() local
271 error = kern_thr_alloc(p, 0, &newtd); in linux_clone_thread()
275 bzero(&newtd->td_startzero, in linux_clone_thread()
277 bcopy(&td->td_startcopy, &newtd->td_startcopy, in linux_clone_thread()
280 newtd->td_proc = p; in linux_clone_thread()
281 thread_cow_get(newtd, td); in linux_clone_thread()
283 cpu_copy_thread(newtd, td); in linux_clone_thread()
286 linux_proc_init(td, newtd, true); in linux_clone_thread()
288 em = em_find(newtd); in linux_clone_thread()
292 linux_set_cloned_tls(newtd, PTRIN(args->tls)); in linux_clone_thread()
[all …]
H A Dlinux_emul.c137 linux_proc_init(struct thread *td, struct thread *newtd, bool init_thread) in linux_proc_init() argument
143 if (newtd != NULL) { in linux_proc_init()
144 p = newtd->td_proc; in linux_proc_init()
150 newtd->td_tid); in linux_proc_init()
152 em->em_tid = newtd->td_tid; in linux_proc_init()
162 newtd->td_emuldata = em; in linux_proc_init()
/freebsd/sys/arm/arm/
H A Dvfp.c280 vfp_new_thread(struct thread *newtd, struct thread *oldtd, bool fork) in vfp_new_thread() argument
284 newpcb = newtd->td_pcb; in vfp_new_thread()
/freebsd/sys/arm64/arm64/
H A Dvfp.c605 vfp_new_thread(struct thread *newtd, struct thread *oldtd, bool fork) in vfp_new_thread() argument
609 newpcb = newtd->td_pcb; in vfp_new_thread()
/freebsd/sys/sys/
H A Dproc.h1251 void thread_cow_get_proc(struct thread *newtd, struct proc *p);
1252 void thread_cow_get(struct thread *newtd, struct thread *td);