Home
last modified time | relevance | path

Searched refs:td2 (Results 1 – 25 of 26) sorted by relevance

12

/freebsd-14.2/sys/kern/
H A Dsys_process.c836 struct thread *td2; in ptrace_sel_coredump_thread() local
843 return (td2); in ptrace_sel_coredump_thread()
907 td2 = tdfind(pid, -1); in kern_ptrace()
908 if (td2 == NULL) { in kern_ptrace()
913 p = td2->td_proc; in kern_ptrace()
941 td2 = p->p_xthread; in kern_ptrace()
945 tid = td2->td_tid; in kern_ptrace()
1603 if (td2 == NULL) { in kern_ptrace()
1618 td2->td_remotereq = tcq; in kern_ptrace()
1620 thread_run_flash(td2); in kern_ptrace()
[all …]
H A Dkern_fork.c407 tidhash_add(td2); in do_fork()
464 bzero(&td2->td_startzero, in do_fork()
470 bcopy(&p2->p_comm, &td2->td_name, sizeof(td2->td_name)); in do_fork()
476 td2->td_vnet = NULL; in do_fork()
484 sched_fork(td, td2); in do_fork()
796 thread_lock(td2); in do_fork()
797 TD_SET_CAN_RUN(td2); in do_fork()
853 struct thread *td2; in fork1() local
1016 if (td2 == NULL) { in fork1()
1018 if (td2 == NULL) { in fork1()
[all …]
H A Dkern_thread.c931 struct thread *td2; in thread_exit() local
1155 thread_lock(td2); in weed_inhib()
1168 thread_lock(td2); in weed_inhib()
1188 thread_lock(td2); in weed_inhib()
1200 thread_unlock(td2); in weed_inhib()
1221 struct thread *td2; in thread_single() local
1279 if (td2 == td) in thread_single()
1281 thread_lock(td2); in thread_single()
1345 if (td2 == td) in thread_single()
1347 thread_lock(td2); in thread_single()
[all …]
H A Dtty_info.c109 thread_compare(struct thread *td, struct thread *td2) in thread_compare() argument
126 thread_lock(td2); in thread_compare()
127 runb = TD_IS_RUNNING(td2) || TD_ON_RUNQ(td2); in thread_compare()
128 estb = sched_pctcpu(td2); in thread_compare()
129 slpb = td2->td_flags & TDF_SINTR; in thread_compare()
130 thread_unlock(td2); in thread_compare()
161 return (td < td2); in thread_compare()
H A Dkern_switch.c441 struct thread *td2; in runq_choose_fuzz() local
442 td2 = td = TAILQ_FIRST(rqh); in runq_choose_fuzz()
444 while (count-- && td2) { in runq_choose_fuzz()
445 if (td2->td_lastcpu == cpu) { in runq_choose_fuzz()
446 td = td2; in runq_choose_fuzz()
449 td2 = TAILQ_NEXT(td2, td_runq); in runq_choose_fuzz()
H A Dkern_sig.c2021 struct thread *td2; in kern_sigqueue() local
2039 td2 = NULL; in kern_sigqueue()
2043 if (td2 == NULL) in kern_sigqueue()
2786 struct thread *td2; in sig_suspend_threads() local
2794 thread_lock(td2); in sig_suspend_threads()
2796 if ((TD_IS_SLEEPING(td2) || TD_IS_SWAPPED(td2)) && in sig_suspend_threads()
2816 if (TD_IS_RUNNING(td2) && td2 != td) in sig_suspend_threads()
2817 forward_signal(td2); in sig_suspend_threads()
2820 thread_unlock(td2); in sig_suspend_threads()
2836 struct thread *td2; in ptracestop() local
[all …]
H A Dsubr_turnstile.c315 struct thread *td1, *td2; in turnstile_adjust_thread() local
341 td2 = TAILQ_NEXT(td, td_lockq); in turnstile_adjust_thread()
343 (td2 != NULL && td->td_priority > td2->td_priority)) { in turnstile_adjust_thread()
H A Dkern_ktrace.c641 struct thread *td2; in ktrprocctor_entered() local
644 td2 = FIRST_THREAD_IN_PROC(p); in ktrprocctor_entered()
645 req = ktr_getrequest_entered(td2, KTR_PROCCTOR); in ktrprocctor_entered()
650 ktr_enqueuerequest(td2, req); in ktrprocctor_entered()
H A Dkern_time.c294 struct thread *td2; in get_cputime() local
302 td2 = tdfind(tid, p->p_pid); in get_cputime()
303 if (td2 == NULL) in get_cputime()
305 kern_thread_cputime(td2, ats); in get_cputime()
306 PROC_UNLOCK(td2->td_proc); in get_cputime()
/freebsd-14.2/sys/arm64/arm64/
H A Dvm_machdep.c86 pcb2 = (struct pcb *)(td2->td_kstack + in cpu_fork()
87 td2->td_kstack_pages * PAGE_SIZE) - 1; in cpu_fork()
89 td2->td_pcb = pcb2; in cpu_fork()
95 ptrauth_fork(td2, td1); in cpu_fork()
103 td2->td_frame = tf; in cpu_fork()
107 td2->td_pcb->pcb_x[PCB_X20] = (uintptr_t)td2; in cpu_fork()
109 td2->td_pcb->pcb_sp = (uintptr_t)td2->td_frame; in cpu_fork()
111 vfp_new_thread(td2, td1, true); in cpu_fork()
114 td2->td_md.md_spinlock_count = 1; in cpu_fork()
115 td2->td_md.md_saved_daif = PSR_DAIF_DEFAULT; in cpu_fork()
[all …]
/freebsd-14.2/sys/riscv/riscv/
H A Dvm_machdep.c67 cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) in cpu_fork() argument
77 pcb2 = (struct pcb *)(td2->td_kstack + in cpu_fork()
78 td2->td_kstack_pages * PAGE_SIZE) - 1; in cpu_fork()
80 td2->td_pcb = pcb2; in cpu_fork()
95 td2->td_frame = tf; in cpu_fork()
98 td2->td_pcb->pcb_s[0] = (uintptr_t)fork_return; in cpu_fork()
99 td2->td_pcb->pcb_s[1] = (uintptr_t)td2; in cpu_fork()
100 td2->td_pcb->pcb_ra = (uintptr_t)fork_trampoline; in cpu_fork()
101 td2->td_pcb->pcb_sp = (uintptr_t)td2->td_frame; in cpu_fork()
104 td2->td_md.md_spinlock_count = 1; in cpu_fork()
[all …]
/freebsd-14.2/sys/arm/arm/
H A Dvm_machdep.c94 cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) in cpu_fork() argument
105 (td2->td_kstack + td2->td_kstack_pages * PAGE_SIZE) - 1; in cpu_fork()
113 td2->td_pcb = pcb2; in cpu_fork()
123 td2->td_frame = (struct trapframe *)pcb2 - 1; in cpu_fork()
124 *td2->td_frame = *td1->td_frame; in cpu_fork()
133 pcb2->pcb_regs.sf_r5 = (register_t)td2; in cpu_fork()
135 pcb2->pcb_regs.sf_sp = STACKALIGN(td2->td_frame); in cpu_fork()
139 vfp_new_thread(td2, td1, true); in cpu_fork()
142 tf = td2->td_frame; in cpu_fork()
148 td2->td_md.md_spinlock_count = 1; in cpu_fork()
[all …]
/freebsd-14.2/sys/i386/i386/
H A Dvm_machdep.c144 pcb2 = td2->td_pcb; in copy_thread()
147 if ((td2->td_pflags & TDP_KTHREAD) == 0) { in copy_thread()
165 set_fsbase(td2, 0); in copy_thread()
166 set_gsbase(td2, 0); in copy_thread()
198 td2->td_md.md_spinlock_count = 1; in copy_thread()
237 pcb2 = get_pcb_td(td2); in cpu_fork()
238 td2->td_pcb = pcb2; in cpu_fork()
240 copy_thread(td1, td2); in cpu_fork()
255 td2->td_frame = (struct trapframe *)((caddr_t)td2->td_pcb - in cpu_fork()
260 p2->p_sysent->sv_set_fork_retval(td2); in cpu_fork()
[all …]
/freebsd-14.2/sys/compat/linux/
H A Dlinux_fork.c70 struct thread *td2; in linux_fork() local
87 thread_lock(td2); in linux_fork()
88 TD_SET_CAN_RUN(td2); in linux_fork()
89 sched_add(td2, SRQ_BORING); in linux_fork()
100 struct thread *td2; in linux_vfork() local
117 thread_lock(td2); in linux_vfork()
118 TD_SET_CAN_RUN(td2); in linux_vfork()
131 struct thread *td2; in linux_clone_proc() local
179 em = em_find(td2); in linux_clone_proc()
227 thread_lock(td2); in linux_clone_proc()
[all …]
H A Dlinux_futex.c898 struct thread *td2; in linux_get_robust_list() local
906 td2 = linux_tdfind(td, args->pid, -1); in linux_get_robust_list()
907 if (td2 == NULL) in linux_get_robust_list()
909 if (SV_PROC_ABI(td2->td_proc) != SV_ABI_LINUX) { in linux_get_robust_list()
910 PROC_UNLOCK(td2->td_proc); in linux_get_robust_list()
914 em = em_find(td2); in linux_get_robust_list()
919 p_candebug(td, td2->td_proc)) { in linux_get_robust_list()
920 PROC_UNLOCK(td2->td_proc); in linux_get_robust_list()
925 PROC_UNLOCK(td2->td_proc); in linux_get_robust_list()
/freebsd-14.2/sys/amd64/amd64/
H A Dvm_machdep.c144 pcb2 = td2->td_pcb; in copy_thread()
147 if ((td2->td_pflags & TDP_KTHREAD) == 0) { in copy_thread()
160 if ((td2->td_pflags & TDP_KTHREAD) != 0) { in copy_thread()
171 td2->td_frame = (struct trapframe *)td2->td_md.md_stack_base - 1; in copy_thread()
193 td2->td_md.md_spinlock_count = 1; in copy_thread()
195 pmap_thread_init_invl_gen(td2); in copy_thread()
212 td2->td_frame->tf_rflags &= ~PSL_T; in copy_thread()
245 set_top_of_stack_td(td2); in cpu_fork()
246 td2->td_pcb = pcb2 = get_pcb_td(td2); in cpu_fork()
248 copy_thread(td1, td2); in cpu_fork()
[all …]
/freebsd-14.2/sys/powerpc/powerpc/
H A Dvm_machdep.c110 cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) in cpu_fork() argument
128 pcb = (struct pcb *)((td2->td_kstack + in cpu_fork()
129 td2->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb)) & ~0x2fUL); in cpu_fork()
130 td2->td_pcb = pcb; in cpu_fork()
148 td2->td_frame = tf; in cpu_fork()
156 cf->cf_arg0 = (register_t)td2; in cpu_fork()
173 td2->td_md.md_spinlock_count = 1; in cpu_fork()
174 td2->td_md.md_saved_msr = psl_kernset; in cpu_fork()
/freebsd-14.2/cddl/contrib/opensolaris/tools/ctf/cvt/
H A Dtdata.c460 tdata_merge(tdata_t *td1, tdata_t *td2) in tdata_merge() argument
466 hash_merge(td1->td_iihash, td2->td_iihash); in tdata_merge()
469 tdata_build_hashes_common(td1, td2->td_iihash); in tdata_merge()
472 td2->td_fwdlist = NULL; in tdata_merge()
474 slist_merge(&td1->td_labels, td2->td_labels, in tdata_merge()
476 td2->td_labels = NULL; in tdata_merge()
480 hash_free(td2->td_layouthash, NULL, NULL); in tdata_merge()
481 td2->td_layouthash = NULL; in tdata_merge()
483 hash_free(td2->td_iihash, NULL, NULL); in tdata_merge()
484 td2->td_iihash = NULL; in tdata_merge()
[all …]
/freebsd-14.2/sys/fs/procfs/
H A Dprocfs_dbregs.c88 struct thread *td2; in procfs_doprocdbregs() local
104 td2 = FIRST_THREAD_IN_PROC(p); in procfs_doprocdbregs()
107 if (SV_PROC_FLAG(td2->td_proc, SV_ILP32) == 0) { in procfs_doprocdbregs()
116 error = PROC(read, dbregs, td2, &r); in procfs_doprocdbregs()
127 error = PROC(write, dbregs, td2, &r); in procfs_doprocdbregs()
H A Dprocfs_fpregs.c82 struct thread *td2; in procfs_doprocfpregs() local
102 td2 = FIRST_THREAD_IN_PROC(p); in procfs_doprocfpregs()
105 if (SV_PROC_FLAG(td2->td_proc, SV_ILP32) == 0) { in procfs_doprocfpregs()
114 error = PROC(read, fpregs, td2, &r); in procfs_doprocfpregs()
125 error = PROC(write, fpregs, td2, &r); in procfs_doprocfpregs()
H A Dprocfs_regs.c82 struct thread *td2; in procfs_doprocregs() local
102 td2 = FIRST_THREAD_IN_PROC(p); in procfs_doprocregs()
105 if ((SV_PROC_FLAG(td2->td_proc, SV_ILP32)) == 0) { in procfs_doprocregs()
114 error = PROC(read, regs, td2, &r); in procfs_doprocregs()
125 error = PROC(write, regs, td2, &r); in procfs_doprocregs()
/freebsd-14.2/lib/libc/tests/nss/
H A Dtestutil.h62 #define TEST_DATA_COMPARE(ent, td1, td2, fcmp, mdata)\ argument
63 __##ent##_test_data_compare(td1, td2, fcmp, mdata);
127 __##ent##_test_data_compare(struct ent##_test_data *td1, struct ent##_test_data *td2,\
134 ATF_REQUIRE(td2 != NULL); \
138 e2 = STAILQ_FIRST(&td2->snapshot_data); \
314 #define DO_2PASS_TEST(ent, td1, td2, f, mdata) \ argument
315 __##ent##_2pass_test(td1, td2, f, mdata)
320 struct ent##_test_data *td2, \
326 rv = __##ent##_test_data_compare(td1, td2, cmp_func, cmp_mdata);\
/freebsd-14.2/sys/i386/linux/
H A Dlinux_ptrace_machdep.c329 struct thread *td2; in linux_ptrace() local
381 td2 = FIRST_THREAD_IN_PROC(p); in linux_ptrace()
382 error = linux_proc_read_fpxregs(td2, &r.fpxreg); in linux_ptrace()
392 td2 = FIRST_THREAD_IN_PROC(p); in linux_ptrace()
393 error = linux_proc_write_fpxregs(td2, &r.fpxreg); in linux_ptrace()
/freebsd-14.2/sys/vm/
H A Dvm_glue.c530 vm_forkproc(struct thread *td, struct proc *p2, struct thread *td2, in vm_forkproc() argument
548 cpu_fork(td, p2, td2, flags); in vm_forkproc()
556 dset = td2->td_domain.dr_policy; in vm_forkproc()
571 cpu_fork(td, p2, td2, flags); in vm_forkproc()
/freebsd-14.2/sys/compat/linprocfs/
H A Dlinprocfs.c1075 struct thread *td2; in linprocfs_doprocstatus() local
1082 td2 = FIRST_THREAD_IN_PROC(p); in linprocfs_doprocstatus()
1096 switch(TD_GET_STATE(td2)) { in linprocfs_doprocstatus()

12