/freebsd-11-stable/sys/kern/ |
H A D | subr_trap.c | 96 userret(struct thread *td, struct trapframe *frame) argument 98 struct proc *p = td->td_proc; 100 CTR3(KTR_SYSC, "userret: thread %p (pid %d, %s)", td, p->p_pid, 101 td->td_name); 116 thread_lock(td); 118 KASSERT(!SIGPENDING(td) || (td->td_flags & 122 "td %p fl %x", p, td, td 213 struct thread *td; local [all...] |
H A D | sched_4bsd.c | 85 #define TS_NAME_LEN (MAXCOMLEN + sizeof(" td ") + sizeof(__XSTRING(UINT_MAX))) 117 #define THREAD_CAN_SCHED(td, cpu) \ 118 CPU_ISSET((cpu), &(td)->td_cpuset->cs_mask) 133 static void sched_priority(struct thread *td, u_char prio); 135 static void maybe_resched(struct thread *td); 136 static void updatepri(struct thread *td); 137 static void resetpriority(struct thread *td); 138 static void resetpriority_thread(struct thread *td); 140 static int sched_pickcpu(struct thread *td); 300 maybe_resched(struct thread *td) argument 315 maybe_preempt(struct thread *td) argument 460 struct thread *td; local 573 updatepri(struct thread *td) argument 598 resetpriority(struct thread *td) argument 617 resetpriority_thread(struct thread *td) argument 708 sched_clock(struct thread *td) argument 741 sched_exit(struct proc *p, struct thread *td) argument 748 sched_exit_thread(FIRST_THREAD_IN_PROC(p), td); local 752 sched_exit_thread(struct thread *td, struct thread *child) argument 768 sched_fork(struct thread *td, struct thread *childtd) argument 774 sched_fork_thread(struct thread *td, struct thread *childtd) argument 794 struct thread *td; local 807 sched_class(struct thread *td, int class) argument 817 sched_priority(struct thread *td, u_char prio) argument 847 sched_lend_prio(struct thread *td, u_char prio) argument 863 sched_unlend_prio(struct thread *td, u_char prio) argument 880 sched_prio(struct thread *td, u_char prio) argument 907 sched_user_prio(struct thread *td, u_char prio) argument 918 sched_lend_user_prio(struct thread *td, u_char prio) argument 931 sched_sleep(struct thread *td, int pri) argument 944 sched_switch(struct thread *td, struct thread *newtd, int flags) argument 1087 sched_wakeup(struct thread *td) argument 1228 sched_pickcpu(struct thread *td) argument 1254 sched_add(struct thread *td, int flags) argument 1393 sched_rem(struct thread *td) argument 1425 struct thread *td; local 1468 sched_preempt(struct thread *td) argument 1481 sched_userret(struct thread *td) argument 1503 sched_bind(struct thread *td, int cpu) argument 1523 sched_unbind(struct thread* td) argument 1531 sched_is_bound(struct thread *td) argument 1538 sched_relinquish(struct thread *td) argument 1564 sched_pctcpu(struct thread *td) argument 1579 sched_pctcpu_delta(struct thread *td) argument 1608 sched_estcpu(struct thread *td) argument 1642 sched_throw(struct thread *td) argument 1670 sched_fork_exit(struct thread *td) argument 1689 sched_tdname(struct thread *td) argument 1706 sched_clear_tdname(struct thread *td) argument 1716 sched_affinity(struct thread *td) argument [all...] |
H A D | subr_syscall.c | 56 syscallenter(struct thread *td) argument 63 p = td->td_proc; 64 sa = &td->td_sa; 66 td->td_pticks = 0; 67 if (td->td_cowgen != p->p_cowgen) 68 thread_cow_update(td); 70 if (traced || td->td_dbgflags & TDB_USERWR) { 72 td->td_dbgflags &= ~TDB_USERWR; 74 td->td_dbgflags |= TDB_SCE; 77 error = (p->p_sysent->sv_fetch_syscall_args)(td); 162 syscallret(struct thread *td, int error) argument [all...] |
H A D | kern_thread.c | 132 static int thread_unsuspend_one(struct thread *td, struct proc *p, 194 struct thread *td; local 196 td = (struct thread *)mem; 197 td->td_state = TDS_INACTIVE; 198 td->td_oncpu = NOCPU; 200 td->td_tid = tid_alloc(); 207 td->td_critnest = 1; 208 td->td_lend_user_pri = PRI_MAX; 209 EVENTHANDLER_DIRECT_INVOKE(thread_ctor, td); 211 audit_thread_alloc(td); 223 struct thread *td; local 265 struct thread *td; local 285 struct thread *td; local 305 proc_linkup0(struct proc *p, struct thread *td) argument 312 proc_linkup(struct proc *p, struct thread *td) argument 353 thread_zombie(struct thread *td) argument 364 thread_stash(struct thread *td) argument 403 struct thread *td; local 419 thread_alloc_stack(struct thread *td, int pages) argument 434 thread_free(struct thread *td) argument 460 thread_cow_get(struct thread *newtd, struct thread *td) argument 469 thread_cow_free(struct thread *td) argument 479 thread_cow_update(struct thread *td) argument 518 struct thread *td; local 627 struct thread *td; local 651 thread_link(struct thread *td, struct proc *p) argument 677 thread_unlink(struct thread *td) argument 778 struct thread *td; local 909 struct thread *td; local 954 struct thread *td; local 1046 thread_suspend_switch(struct thread *td, struct proc *p) argument 1075 thread_suspend_one(struct thread *td) argument 1090 thread_unsuspend_one(struct thread *td, struct proc *p, bool boundary) argument 1114 struct thread *td; local 1153 struct thread *td; local 1200 struct thread *td; local 1215 struct thread *td; local 1249 tidhash_add(struct thread *td) argument 1257 tidhash_remove(struct thread *td) argument [all...] |
H A D | subr_sleepqueue.c | 165 static int sleepq_resume_thread(struct sleepqueue *sq, struct thread *td, 303 struct thread *td; local 305 td = curthread; 308 MPASS(td->td_sleepqueue != NULL); 313 KASSERT(td->td_no_sleeping == 0, 314 ("%s: td %p to sleep on wchan %p with sleeping prohibited", 315 __func__, td, wchan)); 329 sq = td->td_sleepqueue; 349 sq = td->td_sleepqueue; 357 LIST_INSERT_HEAD(&sq->sq_free, td 382 struct thread *td; local 430 struct thread *td; local 556 struct thread *td; local 632 struct thread *td; local 671 struct thread *td; local 694 struct thread *td; local 728 struct thread *td; local 788 sleepq_resume_thread(struct sleepqueue *sq, struct thread *td, int pri) argument 895 struct thread *td, *besttd; local 976 struct thread *td, *tdn; local 1005 struct thread *td; local 1052 sleepq_remove(struct thread *td, void *wchan) argument 1091 sleepq_abort(struct thread *td, int intrval) argument 1165 struct thread *td, *td_next; local 1424 struct thread *td; local [all...] |
H A D | subr_turnstile.c | 160 static void propagate_priority(struct thread *td); 162 struct thread *td); 182 propagate_priority(struct thread *td) argument 187 THREAD_LOCK_ASSERT(td, MA_OWNED); 188 pri = td->td_priority; 189 ts = td->td_blocked; 190 THREAD_LOCKPTR_ASSERT(td, &ts->ts_lock); 199 td = ts->ts_owner; 201 if (td == NULL) { 210 thread_lock_flags(td, MTX_DUPO 289 turnstile_adjust_thread(struct turnstile *ts, struct thread *td) argument 419 turnstile_adjust(struct thread *td, u_char oldpri) argument 639 struct thread *td, *owner; local 677 struct thread *td, *td1; local 767 struct thread *td; local 819 struct thread *td; local 869 struct thread *td; local 952 struct thread *td; local 1025 print_thread(struct thread *td, const char *prefix) argument 1035 struct thread *td; local 1099 print_lockchain(struct thread *td, const char *prefix) argument 1148 struct thread *td; local 1161 struct thread *td; local 1184 print_sleepchain(struct thread *td, const char *prefix) argument 1232 struct thread *td; local 1246 print_waiter(struct thread *td, int indent) argument 1265 struct thread *td; local [all...] |
H A D | kern_idle.c | 58 struct thread *td; local 66 error = kproc_kthread_add(sched_idletd, NULL, &p, &td, 68 pc->pc_idlethread = td; 70 error = kproc_kthread_add(sched_idletd, NULL, &p, &td, 72 PCPU_SET(idlethread, td); 77 thread_lock(td); 78 TD_SET_CAN_RUN(td); 79 td->td_flags |= TDF_IDLETD | TDF_NOLOAD; 80 sched_class(td, PRI_IDLE); 81 sched_prio(td, PRI_MAX_IDL [all...] |
/freebsd-11-stable/sys/compat/linuxkpi/common/include/linux/ |
H A D | compat.h | 45 linux_set_current(struct thread *td) argument 47 if (__predict_false(td->td_lkpi_task == NULL)) 48 linux_alloc_current(td, M_WAITOK); 52 linux_set_current_flags(struct thread *td, int flags) argument 54 if (__predict_false(td->td_lkpi_task == NULL)) 55 return (linux_alloc_current(td, flags));
|
/freebsd-11-stable/sys/i386/ibcs2/ |
H A D | ibcs2_util.h | 56 #define CHECKALT(td, upath, pathp, i) \ 60 _error = ibcs2_emul_find(td, upath, UIO_USERSPACE, pathp, i); \ 65 #define CHECKALTEXIST(td, upath, pathp) CHECKALT(td, upath, pathp, 0) 66 #define CHECKALTCREAT(td, upath, pathp) CHECKALT(td, upath, pathp, 1) 69 int spx_open(struct thread *td);
|
/freebsd-11-stable/sys/compat/cloudabi/ |
H A D | cloudabi_thread.c | 40 cloudabi_sys_thread_exit(struct thread *td, argument 48 umtx_thread_exit(td); 51 cloudabi_sys_lock_unlock(td, &cloudabi_sys_lock_unlock_args); 57 kern_thr_exit(td); 58 exit1(td, 0, 0); 63 cloudabi_sys_thread_yield(struct thread *td, argument 67 sched_relinquish(td);
|
/freebsd-11-stable/sys/arm64/include/ |
H A D | proc.h | 61 struct thread *td = curthread; \ 62 (total) = td->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb); \ 63 (used) = (char *)td->td_kstack + \ 64 td->td_kstack_pages * PAGE_SIZE - \ 65 (char *)&td; \
|
/freebsd-11-stable/sys/powerpc/include/ |
H A D | proc.h | 69 struct thread *td = curthread; \ 70 (total) = td->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb); \ 71 (used) = (char *)td->td_kstack + \ 72 td->td_kstack_pages * PAGE_SIZE - \ 73 (char *)&td; \
|
/freebsd-11-stable/sys/riscv/riscv/ |
H A D | vm_machdep.c | 114 cpu_thread_swapin(struct thread *td) argument 119 cpu_thread_swapout(struct thread *td) argument 124 cpu_set_syscall_retval(struct thread *td, int error) argument 128 frame = td->td_frame; 132 frame->tf_a[0] = td->td_retval[0]; 133 frame->tf_a[1] = td->td_retval[1]; 156 cpu_copy_thread(struct thread *td, struct thread *td0) argument 159 bcopy(td0->td_frame, td->td_frame, sizeof(struct trapframe)); 160 bcopy(td0->td_pcb, td->td_pcb, sizeof(struct pcb)); 162 td 177 cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg, stack_t *stack) argument 188 cpu_set_user_tls(struct thread *td, void *tls_base) argument 202 cpu_thread_exit(struct thread *td) argument 207 cpu_thread_alloc(struct thread *td) argument 217 cpu_thread_free(struct thread *td) argument 222 cpu_thread_clean(struct thread *td) argument 233 cpu_fork_kthread_handler(struct thread *td, void (*func)(void *), void *arg) argument 243 cpu_exit(struct thread *td) argument [all...] |
/freebsd-11-stable/sys/arm/arm/ |
H A D | machdep_ptrace.c | 41 ptrace_read_int(struct thread *td, vm_offset_t addr, uint32_t *v) argument 44 if (proc_readmem(td, td->td_proc, addr, v, sizeof(*v)) != sizeof(*v)) 50 ptrace_write_int(struct thread *td, vm_offset_t addr, uint32_t v) argument 53 if (proc_writemem(td, td->td_proc, addr, &v, sizeof(v)) != sizeof(v)) 62 struct thread *td = cookie; local 69 ret = td->td_frame->tf_pc; 72 ret = td->td_frame->tf_usr_lr; 75 ret = td 88 struct thread *td = cookie; local 111 ptrace_get_alternative_next(struct thread *td, uint32_t cur_instr, uint32_t *alt_next_address) argument 128 ptrace_single_step(struct thread *td) argument 185 ptrace_clear_single_step(struct thread *td) argument 215 ptrace_set_pc(struct thread *td, unsigned long addr) argument [all...] |
/freebsd-11-stable/sys/sys/ |
H A D | syscallsubr.h | 66 int kern___getcwd(struct thread *td, char *buf, enum uio_seg bufseg, 68 int kern_accept(struct thread *td, int s, struct sockaddr **name, 70 int kern_accept4(struct thread *td, int s, struct sockaddr **name, 72 int kern_accessat(struct thread *td, int fd, char *path, 74 int kern_adjtime(struct thread *td, struct timeval *delta, 76 int kern_alternate_path(struct thread *td, const char *prefix, const char *path, 78 int kern_bindat(struct thread *td, int dirfd, int fd, struct sockaddr *sa); 79 int kern_cap_ioctls_limit(struct thread *td, int fd, u_long *cmds, 81 int kern_cap_rights_limit(struct thread *td, int fd, cap_rights_t *rights); 82 int kern_chdir(struct thread *td, cha [all...] |
H A D | sched.h | 83 void sched_fork(struct thread *td, struct thread *childtd); 84 void sched_fork_exit(struct thread *td); 85 void sched_class(struct thread *td, int class); 92 void sched_exit_thread(struct thread *td, struct thread *child); 93 u_int sched_estcpu(struct thread *td); 94 void sched_fork_thread(struct thread *td, struct thread *child); 95 void sched_lend_prio(struct thread *td, u_char prio); 96 void sched_lend_user_prio(struct thread *td, u_char pri); 97 fixpt_t sched_pctcpu(struct thread *td); 98 void sched_prio(struct thread *td, u_cha [all...] |
/freebsd-11-stable/sys/mips/mips/ |
H A D | pm_machdep.c | 87 struct thread *td; local 94 td = curthread; 95 p = td->td_proc; 101 regs = td->td_frame; 107 sf.sf_uc.uc_stack = td->td_sigstk; 112 sf.sf_uc.uc_mcontext.mc_tls = td->td_md.md_tls; 116 sf.sf_uc.uc_mcontext.mc_fpused = td->td_md.md_flags & MDTD_FPUSED; 119 if (td == PCPU_GET(fpcurthread)) 120 MipsSaveCurFPState(td); 121 bcopy((void *)&td 189 sys_sigreturn(struct thread *td, struct sigreturn_args *uap) argument 208 ptrace_set_pc(struct thread *td, unsigned long addr) argument 215 ptrace_read_int(struct thread *td, off_t addr, int *v) argument 224 ptrace_write_int(struct thread *td, off_t addr, int v) argument 233 ptrace_single_step(struct thread *td) argument 299 fill_regs(struct thread *td, struct reg *regs) argument 306 set_regs(struct thread *td, struct reg *regs) argument 322 get_mcontext(struct thread *td, mcontext_t *mcp, int flags) argument 352 set_mcontext(struct thread *td, mcontext_t *mcp) argument 375 fill_fpregs(struct thread *td, struct fpreg *fpregs) argument 384 set_fpregs(struct thread *td, struct fpreg *fpregs) argument 400 exec_setregs(struct thread *td, struct image_params *imgp, u_long stack) argument 472 ptrace_clear_single_step(struct thread *td) argument [all...] |
/freebsd-11-stable/sys/amd64/amd64/ |
H A D | io.c | 38 iodev_open(struct thread *td) argument 41 td->td_frame->tf_rflags |= PSL_IOPL; 46 iodev_close(struct thread *td) argument 49 td->td_frame->tf_rflags &= ~PSL_IOPL;
|
/freebsd-11-stable/tools/regression/pthread/unwind/ |
H A D | sem_wait_cancel.cpp | 26 pthread_t td; local 29 pthread_create(&td, NULL, thr, NULL); 31 pthread_cancel(td); 32 pthread_join(td, NULL);
|
H A D | catch_pthread_exit.cpp | 26 pthread_t td; local 28 pthread_create(&td, NULL, thr_routine, NULL); 29 pthread_join(td, NULL);
|
H A D | thread_normal_exit.cpp | 22 pthread_t td; local 24 pthread_create(&td, NULL, thr_routine, NULL); 25 pthread_join(td, NULL);
|
/freebsd-11-stable/sys/i386/i386/ |
H A D | io.c | 38 iodev_open(struct thread *td) argument 41 td->td_frame->tf_eflags |= PSL_IOPL; 46 iodev_close(struct thread *td) argument 49 td->td_frame->tf_eflags &= ~PSL_IOPL;
|
/freebsd-11-stable/sys/powerpc/powerpc/ |
H A D | copyinout.c | 175 struct thread *td; local 182 td = curthread; 183 pm = &td->td_proc->p_vmspace->vm_pmap; 185 td->td_pcb->pcb_onfault = &env; 187 td->td_pcb->pcb_onfault = NULL; 196 td->td_pcb->pcb_onfault = NULL; 207 td->td_pcb->pcb_onfault = NULL; 214 struct thread *td; local 221 td = curthread; 222 pm = &td 286 struct thread *td; local 315 struct thread *td; local 344 struct thread *td; local 386 struct thread *td; local 415 struct thread *td; local 443 struct thread *td; local 472 struct thread *td; local 501 struct thread *td; local 530 struct thread *td; local 582 struct thread *td; local [all...] |
/freebsd-11-stable/tools/regression/tls/ttls4/ |
H A D | ttls4.c | 31 pthread_t td; local 35 pthread_create(&td, NULL, f1, NULL); 36 pthread_join(td, NULL); 40 pthread_create(&td, NULL, f1, NULL); 41 pthread_join(td, NULL);
|
/freebsd-11-stable/sys/sparc64/include/ |
H A D | proc.h | 69 struct thread *td = curthread; \ 70 (total) = td->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb); \ 71 (used) = (char *)td->td_kstack + \ 72 td->td_kstack_pages * PAGE_SIZE - \ 73 (char *)&td; \
|