| /f-stack/freebsd/kern/ |
| H A D | sys_process.c | 656 td2 = tdfind(pid, -1); in kern_ptrace() 657 if (td2 == NULL) { in kern_ptrace() 662 p = td2->td_proc; in kern_ptrace() 690 td2 = p->p_xthread; in kern_ptrace() 694 tid = td2->td_tid; in kern_ptrace() 791 FIX_SSTEP(td2); in kern_ptrace() 860 thread_lock(td2); in kern_ptrace() 862 thread_unlock(td2); in kern_ptrace() 928 bcopy(td2->td_sa.args, addr, td2->td_sa.callp->sy_narg * in kern_ptrace() 1212 pl->pl_lwpid = td2->td_tid; in kern_ptrace() [all …]
|
| H A D | kern_thread.c | 853 struct thread *td2; in thread_exit() local 1077 thread_lock(td2); in weed_inhib() 1090 thread_lock(td2); in weed_inhib() 1107 if (TD_IS_SUSPENDED(td2) && (td2->td_flags & (TDF_BOUNDARY | in weed_inhib() 1110 thread_lock(td2); in weed_inhib() 1126 thread_unlock(td2); in weed_inhib() 1147 struct thread *td2; in thread_single() local 1194 if (td2 == td) in thread_single() 1196 thread_lock(td2); in thread_single() 1201 } else if (TD_IS_RUNNING(td2) && td != td2) { in thread_single() [all …]
|
| H A D | kern_fork.c | 399 tidhash_add(td2); in do_fork() 459 bzero(&td2->td_startzero, in do_fork() 465 bcopy(&p2->p_comm, &td2->td_name, sizeof(td2->td_name)); in do_fork() 471 td2->td_vnet = NULL; in do_fork() 479 sched_fork(td, td2); in do_fork() 769 thread_lock(td2); in do_fork() 770 TD_SET_CAN_RUN(td2); in do_fork() 826 struct thread *td2; in fork1() local 939 if (td2 == NULL) { in fork1() 941 if (td2 == NULL) { in fork1() [all …]
|
| H A D | tty_info.c | 111 thread_compare(struct thread *td, struct thread *td2) in thread_compare() argument 128 thread_lock(td2); in thread_compare() 129 runb = TD_IS_RUNNING(td2) | TD_ON_RUNQ(td2); in thread_compare() 130 estb = sched_pctcpu(td2); in thread_compare() 131 slpb = td2->td_flags & TDF_SINTR; in thread_compare() 132 thread_unlock(td2); in thread_compare() 163 return (td < td2); in thread_compare()
|
| H A D | kern_switch.c | 447 struct thread *td2; in runq_choose_fuzz() local 448 td2 = td = TAILQ_FIRST(rqh); in runq_choose_fuzz() 450 while (count-- && td2) { in runq_choose_fuzz() 451 if (td2->td_lastcpu == cpu) { in runq_choose_fuzz() 452 td = td2; in runq_choose_fuzz() 455 td2 = TAILQ_NEXT(td2, td_runq); in runq_choose_fuzz()
|
| H A D | kern_sig.c | 2524 struct thread *td2; in sig_suspend_threads() local 2533 thread_lock(td2); in sig_suspend_threads() 2535 if ((TD_IS_SLEEPING(td2) || TD_IS_SWAPPED(td2)) && in sig_suspend_threads() 2546 if (TD_SBDRY_INTR(td2)) { in sig_suspend_threads() 2552 thread_suspend_one(td2); in sig_suspend_threads() 2554 if (sending || td != td2) in sig_suspend_threads() 2557 if (TD_IS_RUNNING(td2) && td2 != td) in sig_suspend_threads() 2558 forward_signal(td2); in sig_suspend_threads() 2561 thread_unlock(td2); in sig_suspend_threads() 2577 struct thread *td2; in ptracestop() local [all …]
|
| H A D | subr_turnstile.c | 316 struct thread *td1, *td2; in turnstile_adjust_thread() local 342 td2 = TAILQ_NEXT(td, td_lockq); in turnstile_adjust_thread() 344 (td2 != NULL && td->td_priority > td2->td_priority)) { in turnstile_adjust_thread()
|
| H A D | kern_ktrace.c | 554 struct thread *td2; in ktrprocctor_entered() local 557 td2 = FIRST_THREAD_IN_PROC(p); in ktrprocctor_entered() 558 req = ktr_getrequest_entered(td2, KTR_PROCCTOR); in ktrprocctor_entered() 563 ktr_enqueuerequest(td2, req); in ktrprocctor_entered()
|
| H A D | kern_time.c | 291 struct thread *td2; in get_cputime() local 299 td2 = tdfind(tid, p->p_pid); in get_cputime() 300 if (td2 == NULL) in get_cputime() 302 kern_thread_cputime(td2, ats); in get_cputime() 303 PROC_UNLOCK(td2->td_proc); in get_cputime()
|
| /f-stack/freebsd/arm64/arm64/ |
| H A D | vm_machdep.c | 90 pcb2 = (struct pcb *)(td2->td_kstack + in cpu_fork() 91 td2->td_kstack_pages * PAGE_SIZE) - 1; in cpu_fork() 93 td2->td_pcb = pcb2; in cpu_fork() 102 td2->td_frame = tf; in cpu_fork() 105 td2->td_pcb->pcb_x[8] = (uintptr_t)fork_return; in cpu_fork() 106 td2->td_pcb->pcb_x[9] = (uintptr_t)td2; in cpu_fork() 107 td2->td_pcb->pcb_lr = (uintptr_t)fork_trampoline; in cpu_fork() 108 td2->td_pcb->pcb_sp = (uintptr_t)td2->td_frame; in cpu_fork() 109 td2->td_pcb->pcb_fpusaved = &td2->td_pcb->pcb_fpustate; in cpu_fork() 110 td2->td_pcb->pcb_vfpcpu = UINT_MAX; in cpu_fork() [all …]
|
| /f-stack/freebsd/arm/arm/ |
| H A D | vm_machdep.c | 96 cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) in cpu_fork() argument 107 (td2->td_kstack + td2->td_kstack_pages * PAGE_SIZE) - 1; in cpu_fork() 116 td2->td_pcb = pcb2; in cpu_fork() 126 td2->td_frame = (struct trapframe *)pcb2 - 1; in cpu_fork() 127 *td2->td_frame = *td1->td_frame; in cpu_fork() 136 pcb2->pcb_regs.sf_r5 = (register_t)td2; in cpu_fork() 138 pcb2->pcb_regs.sf_sp = STACKALIGN(td2->td_frame); in cpu_fork() 144 tf = td2->td_frame; in cpu_fork() 150 td2->td_md.md_spinlock_count = 1; in cpu_fork() 151 td2->td_md.md_saved_cspr = PSR_SVC32_MODE; in cpu_fork()
|
| /f-stack/freebsd/amd64/amd64/ |
| H A D | vm_machdep.c | 172 set_top_of_stack_td(td2); in cpu_fork() 173 td2->td_pcb = pcb2 = get_pcb_td(td2); in cpu_fork() 192 td2->td_frame = (struct trapframe *)td2->td_md.md_stack_base - 1; in cpu_fork() 195 td2->td_frame->tf_rax = 0; /* Child returns zero */ in cpu_fork() 196 td2->td_frame->tf_rflags &= ~PSL_C; /* success */ in cpu_fork() 197 td2->td_frame->tf_rdx = 1; in cpu_fork() 204 td2->td_frame->tf_rflags &= ~PSL_T; in cpu_fork() 224 td2->td_md.md_spinlock_count = 1; in cpu_fork() 225 td2->td_md.md_saved_flags = PSL_KERNEL | PSL_I; in cpu_fork() 226 pmap_thread_init_invl_gen(td2); in cpu_fork() [all …]
|
| /f-stack/freebsd/mips/mips/ |
| H A D | vm_machdep.c | 102 pcb2 = td2->td_pcb; in cpu_fork() 120 td2->td_frame->v0 = 0; in cpu_fork() 121 td2->td_frame->v1 = 1; in cpu_fork() 122 td2->td_frame->a3 = 0; in cpu_fork() 143 td2->td_md.md_tls = td1->td_md.md_tls; in cpu_fork() 145 td2->td_md.md_saved_intr = MIPS_SR_INT_IE; in cpu_fork() 146 td2->td_md.md_spinlock_count = 1; in cpu_fork() 164 td2->td_md.md_cop2 = octeon_cop2_alloc_ctx(); in cpu_fork() 165 memcpy(td2->td_md.md_cop2, td1->td_md.md_cop2, in cpu_fork() 169 td2->td_md.md_ucop2 = octeon_cop2_alloc_ctx(); in cpu_fork() [all …]
|
| /f-stack/freebsd/i386/i386/ |
| H A D | vm_machdep.c | 179 pcb2 = get_pcb_td(td2); in cpu_fork() 180 td2->td_pcb = pcb2; in cpu_fork() 201 td2->td_frame = (struct trapframe *)((caddr_t)td2->td_pcb - in cpu_fork() 205 td2->td_frame->tf_eax = 0; /* Child returns zero */ in cpu_fork() 206 td2->td_frame->tf_eflags &= ~PSL_C; /* success */ in cpu_fork() 207 td2->td_frame->tf_edx = 1; in cpu_fork() 214 td2->td_frame->tf_eflags &= ~PSL_T; in cpu_fork() 224 pcb2->pcb_esp = (int)td2->td_frame - sizeof(void *); in cpu_fork() 225 pcb2->pcb_ebx = (int)td2; /* fork_trampoline argument */ in cpu_fork() 256 td2->td_md.md_spinlock_count = 1; in cpu_fork() [all …]
|
| /f-stack/freebsd/i386/linux/ |
| H A D | linux_ptrace.c | 333 struct thread *td2; in linux_ptrace() local 385 td2 = FIRST_THREAD_IN_PROC(p); in linux_ptrace() 386 error = linux_proc_read_fpxregs(td2, &r.fpxreg); in linux_ptrace() 396 td2 = FIRST_THREAD_IN_PROC(p); in linux_ptrace() 397 error = linux_proc_write_fpxregs(td2, &r.fpxreg); in linux_ptrace()
|
| /f-stack/freebsd/vm/ |
| H A D | vm_glue.c | 539 vm_forkproc(struct thread *td, struct proc *p2, struct thread *td2, in vm_forkproc() argument 559 cpu_fork(td, p2, td2, flags); in vm_forkproc() 567 dset = td2->td_domain.dr_policy; in vm_forkproc() 582 cpu_fork(td, p2, td2, flags); in vm_forkproc()
|