/freebsd/sys/arm64/arm64/ |
H A D | vm_machdep.c | 70 cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) in cpu_fork() argument 78 if (td1 == curthread) { in cpu_fork() 84 td1->td_pcb->pcb_tpidr_el0 = READ_SPECIALREG(tpidr_el0); in cpu_fork() 85 td1->td_pcb->pcb_tpidrro_el0 = READ_SPECIALREG(tpidrro_el0); in cpu_fork() 87 if ((td1->td_pcb->pcb_fpflags & PCB_FP_STARTED) != 0) in cpu_fork() 88 vfp_save_state(td1, td1->td_pcb); in cpu_fork() 96 bcopy(td1->td_pcb, pcb2, sizeof(*pcb2)); in cpu_fork() 101 ptrauth_fork(td2, td1); in cpu_fork() 104 bcopy(td1->td_frame, tf, sizeof(*tf)); in cpu_fork() 107 tf->tf_spsr = td1->td_frame->tf_spsr & (PSR_M_32 | PSR_DAIF); in cpu_fork() [all …]
|
/freebsd/sys/powerpc/powerpc/ |
H A D | vm_machdep.c | 108 cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) in cpu_fork() argument 114 KASSERT(td1 == curthread || td1 == &thread0, in cpu_fork() 117 td1, p2, flags); in cpu_fork() 123 if (td1 == curthread) in cpu_fork() 124 cpu_update_pcb(td1); in cpu_fork() 131 bcopy(td1->td_pcb, pcb, sizeof(struct pcb)); in cpu_fork() 139 bcopy(td1->td_frame, tf, sizeof(*tf)); in cpu_fork()
|
/freebsd/sys/arm/arm/ |
H A D | vm_machdep.c | 91 cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) in cpu_fork() argument 105 if (curthread == td1) { in cpu_fork() 106 if ((td1->td_pcb->pcb_fpflags & PCB_FP_STARTED) != 0) in cpu_fork() 107 vfp_save_state(td1, td1->td_pcb); in cpu_fork() 113 bcopy(td1->td_pcb, pcb2, sizeof(*pcb2)); in cpu_fork() 117 bcopy(&td1->td_proc->p_md, mdp2, sizeof(*mdp2)); in cpu_fork() 121 *td2->td_frame = *td1->td_frame; in cpu_fork() 136 vfp_new_thread(td2, td1, true); in cpu_fork()
|
/freebsd/cddl/contrib/opensolaris/tools/ctf/cvt/ |
H A D | tdata.c | 460 tdata_merge(tdata_t *td1, tdata_t *td2) in tdata_merge() argument 462 td1->td_curemark = MAX(td1->td_curemark, td2->td_curemark); in tdata_merge() 463 td1->td_curvgen = MAX(td1->td_curvgen, td2->td_curvgen); in tdata_merge() 464 td1->td_nextid = MAX(td1->td_nextid, td2->td_nextid); in tdata_merge() 466 hash_merge(td1->td_iihash, td2->td_iihash); in tdata_merge() 469 tdata_build_hashes_common(td1, td2->td_iihash); in tdata_merge() 471 list_concat(&td1->td_fwdlist, td2->td_fwdlist); in tdata_merge() 474 slist_merge(&td1->td_labels, td2->td_labels, in tdata_merge()
|
/freebsd/sys/i386/i386/ |
H A D | vm_machdep.c | 138 copy_thread(struct thread *td1, struct thread *td2) in copy_thread() argument 146 MPASS(td1 == curthread); in copy_thread() 147 td1->td_pcb->pcb_gs = rgs(); in copy_thread() 149 if (PCPU_GET(fpcurthread) == td1) in copy_thread() 150 npxsave(td1->td_pcb->pcb_save); in copy_thread() 155 bcopy(td1->td_pcb, pcb2, sizeof(*pcb2)); in copy_thread() 169 bcopy(get_pcb_user_save_td(td1), get_pcb_user_save_pcb(pcb2), in copy_thread() 206 cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) in cpu_fork() argument 212 p1 = td1->td_proc; in cpu_fork() 238 copy_thread(td1, td2); in cpu_fork() [all …]
|
/freebsd/sys/amd64/amd64/ |
H A D | vm_machdep.c | 138 copy_thread(struct thread *td1, struct thread *td2) in copy_thread() argument 146 MPASS(td1 == curthread); in copy_thread() 147 fpuexit(td1); in copy_thread() 148 update_pcb_bases(td1->td_pcb); in copy_thread() 152 bcopy(td1->td_pcb, pcb2, sizeof(*pcb2)); in copy_thread() 165 bcopy(get_pcb_user_save_td(td1), get_pcb_user_save_pcb(pcb2), in copy_thread() 200 if ((td1->td_proc->p_flag & P_KPROC) == 0) { in copy_thread() 201 bcopy(td1->td_frame, td2->td_frame, sizeof(struct trapframe)); in copy_thread() 220 cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) in cpu_fork() argument 227 p1 = td1->td_proc; in cpu_fork() [all …]
|
/freebsd/lib/libc/tests/nss/ |
H A D | testutil.h | 62 #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,\ 133 ATF_REQUIRE(td1 != NULL); \ 137 e1 = STAILQ_FIRST(&td1->snapshot_data); \ 314 #define DO_2PASS_TEST(ent, td1, td2, f, mdata) \ argument 315 __##ent##_2pass_test(td1, td2, f, mdata) 319 __##ent##_2pass_test(struct ent##_test_data *td1, \ 326 rv = __##ent##_test_data_compare(td1, td2, cmp_func, cmp_mdata);\
|
/freebsd/sys/kern/ |
H A D | subr_turnstile.c | 315 struct thread *td1, *td2; in turnstile_adjust_thread() local 340 td1 = TAILQ_PREV(td, threadqueue, td_lockq); in turnstile_adjust_thread() 342 if ((td1 != NULL && td->td_priority < td1->td_priority) || in turnstile_adjust_thread() 352 TAILQ_FOREACH(td1, &ts->ts_blocked[queue], td_lockq) { in turnstile_adjust_thread() 353 MPASS(td1->td_proc->p_magic == P_MAGIC); in turnstile_adjust_thread() 354 if (td1->td_priority > td->td_priority) in turnstile_adjust_thread() 358 if (td1 == NULL) in turnstile_adjust_thread() 361 TAILQ_INSERT_BEFORE(td1, td, td_lockq); in turnstile_adjust_thread() 363 if (td1 == NULL) in turnstile_adjust_thread() 370 td->td_tid, td1->td_tid, ts->ts_lockobj, in turnstile_adjust_thread() [all …]
|
H A D | kern_membarrier.c | 120 struct thread *td1; in kern_membarrier() 163 td1 = cpuid_to_pcpu[c]->pc_curthread; in kern_membarrier() 164 p1 = td1->td_proc; in kern_membarrier() 119 struct thread *td1; kern_membarrier() local
|
H A D | kern_resource.c | 302 struct thread *td1; in sys_rtprio_thread() local 313 td1 = td; in sys_rtprio_thread() 316 td1 = tdfind(uap->lwpid, -1); in sys_rtprio_thread() 317 if (td1 == NULL) in sys_rtprio_thread() 319 p = td1->td_proc; in sys_rtprio_thread() 326 pri_to_rtp(td1, &rtp); in sys_rtprio_thread() 358 error = rtp_to_pri(&rtp, td1); in sys_rtprio_thread()
|
H A D | kern_proc.c | 512 struct thread *td1; in pget() local 526 td1 = tdfind(pid, -1); in pget() 527 if (td1 != NULL) in pget() 528 p = td1->td_proc; in pget() 3201 struct thread *td1; in sysctl_kern_proc_sigfastblk() local 3226 td1 = FIRST_THREAD_IN_PROC(p); in sysctl_kern_proc_sigfastblk() 3228 FOREACH_THREAD_IN_PROC(p, td1) { in sysctl_kern_proc_sigfastblk() 3229 if (td1->td_tid == pid) in sysctl_kern_proc_sigfastblk() 3233 if (td1 == NULL) { in sysctl_kern_proc_sigfastblk() 3244 if ((td1->td_pflags & TDP_SIGFASTBLOCK) != 0) in sysctl_kern_proc_sigfastblk() [all …]
|
H A D | kern_umtx.c | 1773 struct thread *td1; in umtx_pi_adjust_thread() local 1796 td1 = uq1->uq_thread; in umtx_pi_adjust_thread() 1797 MPASS(td1->td_proc->p_magic == P_MAGIC); in umtx_pi_adjust_thread() 1798 if (UPRI(td1) > UPRI(td)) in umtx_pi_adjust_thread() 2029 struct thread *td, *td1; in umtxq_sleep_pi() local 2046 td1 = tdfind(owner, shared ? -1 : td->td_proc->p_pid); in umtxq_sleep_pi() 2048 if (td1 != NULL) { in umtxq_sleep_pi() 2050 umtx_pi_setowner(pi, td1); in umtxq_sleep_pi() 2051 PROC_UNLOCK(td1->td_proc); in umtxq_sleep_pi()
|
/freebsd/sys/compat/linux/ |
H A D | linux_misc.c | 2708 linux_up_rtprio_if(struct thread *td1, struct rtprio *rtp) in linux_up_rtprio_if() argument 2712 pri_to_rtp(td1, &rtp2); in linux_up_rtprio_if() 2776 struct thread *td1; in linux_ioprio_get() local 2783 td1 = NULL; in linux_ioprio_get() 2791 td1 = td; in linux_ioprio_get() 2792 p = td1->td_proc; in linux_ioprio_get() 2795 td1 = linux_tdfind(td, args->who, -1); in linux_ioprio_get() 2796 if (td1 != NULL) in linux_ioprio_get() 2797 p = td1->td_proc; in linux_ioprio_get() 2806 if (td1 != NULL) { in linux_ioprio_get() [all …]
|
H A D | linux_futex.c | 362 struct thread *td1; in linux_futex_lock_pi() local 535 td1 = linux_tdfind(td, owner & FUTEX_TID_MASK, -1); in linux_futex_lock_pi() 536 if (td1 != NULL) { in linux_futex_lock_pi() 537 owner = td1->td_tid; in linux_futex_lock_pi() 538 PROC_UNLOCK(td1->td_proc); in linux_futex_lock_pi()
|
/freebsd/sys/riscv/riscv/ |
H A D | vm_machdep.c | 86 cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) in cpu_fork() argument 99 bcopy(td1->td_pcb, pcb2, sizeof(*pcb2)); in cpu_fork() 102 bcopy(td1->td_frame, tf, sizeof(*tf)); in cpu_fork()
|