/freebsd-10-stable/sys/kern/ |
H A D | subr_trap.c | 103 userret(struct thread *td, struct trapframe *frame) argument 105 struct proc *p = td->td_proc; 107 CTR3(KTR_SYSC, "userret: thread %p (pid %d, %s)", td, p->p_pid, 108 td->td_name); 123 thread_lock(td); 125 KASSERT(!SIGPENDING(td) || (td->td_flags & 129 "td %p fl %x", p, td, td 211 struct thread *td; local [all...] |
H A D | sched_4bsd.c | 86 #define TS_NAME_LEN (MAXCOMLEN + sizeof(" td ") + sizeof(__XSTRING(UINT_MAX))) 116 #define THREAD_CAN_SCHED(td, cpu) \ 117 CPU_ISSET((cpu), &(td)->td_cpuset->cs_mask) 129 static void sched_priority(struct thread *td, u_char prio); 131 static void maybe_resched(struct thread *td); 132 static void updatepri(struct thread *td); 133 static void resetpriority(struct thread *td); 134 static void resetpriority_thread(struct thread *td); 136 static int sched_pickcpu(struct thread *td); 296 maybe_resched(struct thread *td) argument 311 maybe_preempt(struct thread *td) argument 457 struct thread *td; local 570 updatepri(struct thread *td) argument 595 resetpriority(struct thread *td) argument 613 resetpriority_thread(struct thread *td) argument 705 sched_clock(struct thread *td) argument 738 sched_exit(struct proc *p, struct thread *td) argument 745 sched_exit_thread(FIRST_THREAD_IN_PROC(p), td); local 749 sched_exit_thread(struct thread *td, struct thread *child) argument 764 sched_fork(struct thread *td, struct thread *childtd) argument 770 sched_fork_thread(struct thread *td, struct thread *childtd) argument 789 struct thread *td; local 802 sched_class(struct thread *td, int class) argument 812 sched_priority(struct thread *td, u_char prio) argument 842 sched_lend_prio(struct thread *td, u_char prio) argument 858 sched_unlend_prio(struct thread *td, u_char prio) argument 875 sched_prio(struct thread *td, u_char prio) argument 902 sched_user_prio(struct thread *td, u_char prio) argument 913 sched_lend_user_prio(struct thread *td, u_char prio) argument 926 sched_sleep(struct thread *td, int pri) argument 939 sched_switch(struct thread *td, struct thread *newtd, int flags) argument 1082 sched_wakeup(struct thread *td) argument 1223 sched_pickcpu(struct thread *td) argument 1249 sched_add(struct thread *td, int flags) argument 1388 sched_rem(struct thread *td) argument 1420 struct thread *td; local 1463 sched_preempt(struct thread *td) argument 1476 sched_userret(struct thread *td) argument 1498 sched_bind(struct thread *td, int cpu) argument 1518 sched_unbind(struct thread* td) argument 1526 sched_is_bound(struct thread *td) argument 1533 sched_relinquish(struct thread *td) argument 1559 sched_pctcpu(struct thread *td) argument 1574 sched_pctcpu_delta(struct thread *td) argument 1635 sched_throw(struct thread *td) argument 1663 sched_fork_exit(struct thread *td) argument 1682 sched_tdname(struct thread *td) argument 1699 sched_clear_tdname(struct thread *td) argument 1709 sched_affinity(struct thread *td) argument [all...] |
H A D | subr_syscall.c | 56 syscallenter(struct thread *td, struct syscall_args *sa) argument 62 p = td->td_proc; 64 td->td_pticks = 0; 65 if (td->td_ucred != p->p_ucred) 66 cred_update_thread(td); 68 if (traced || td->td_dbgflags & TDB_USERWR) { 70 td->td_dbgflags &= ~TDB_USERWR; 72 td->td_dbgflags |= TDB_SCE; 75 error = (p->p_sysent->sv_fetch_syscall_args)(td, sa); 77 if (KTRPOINT(td, KTR_SYSCAL 175 syscallret(struct thread *td, int error, struct syscall_args *sa __unused) argument [all...] |
H A D | kern_thread.c | 80 static int thread_unsuspend_one(struct thread *td, struct proc *p, 137 struct thread *td; local 139 td = (struct thread *)mem; 140 td->td_state = TDS_INACTIVE; 141 td->td_oncpu = NOCPU; 143 td->td_tid = tid_alloc(); 150 td->td_critnest = 1; 151 td->td_lend_user_pri = PRI_MAX; 152 EVENTHANDLER_INVOKE(thread_ctor, td); 154 audit_thread_alloc(td); 166 struct thread *td; local 206 struct thread *td; local 227 struct thread *td; local 247 proc_linkup0(struct proc *p, struct thread *td) argument 254 proc_linkup(struct proc *p, struct thread *td) argument 295 thread_zombie(struct thread *td) argument 306 thread_stash(struct thread *td) argument 346 struct thread *td; local 361 thread_alloc_stack(struct thread *td, int pages) argument 376 thread_free(struct thread *td) argument 403 struct thread *td; local 512 struct thread *td; local 536 thread_link(struct thread *td, struct proc *p) argument 562 thread_unlink(struct thread *td) argument 663 struct thread *td; local 794 struct thread *td; local 839 struct thread *td; local 927 thread_suspend_switch(struct thread *td, struct proc *p) argument 956 thread_suspend_one(struct thread *td) argument 971 thread_unsuspend_one(struct thread *td, struct proc *p, bool boundary) argument 995 struct thread *td; local 1034 struct thread *td; local 1081 struct thread *td; local 1096 struct thread *td; local 1130 tidhash_add(struct thread *td) argument 1138 tidhash_remove(struct thread *td) argument [all...] |
H A D | subr_turnstile.c | 161 static void propagate_priority(struct thread *td); 163 struct thread *td); 183 propagate_priority(struct thread *td) argument 188 THREAD_LOCK_ASSERT(td, MA_OWNED); 189 pri = td->td_priority; 190 ts = td->td_blocked; 191 THREAD_LOCKPTR_ASSERT(td, &ts->ts_lock); 200 td = ts->ts_owner; 202 if (td == NULL) { 211 thread_lock_flags(td, MTX_DUPO 290 turnstile_adjust_thread(struct turnstile *ts, struct thread *td) argument 420 turnstile_adjust(struct thread *td, u_char oldpri) argument 640 struct thread *td, *owner; local 678 struct thread *td, *td1; local 768 struct thread *td; local 820 struct thread *td; local 870 struct thread *td; local 953 struct thread *td; local 1026 print_thread(struct thread *td, const char *prefix) argument 1036 struct thread *td; local 1100 print_lockchain(struct thread *td, const char *prefix) argument 1149 struct thread *td; local 1162 struct thread *td; local 1185 print_sleepchain(struct thread *td, const char *prefix) argument 1233 struct thread *td; local 1247 print_waiter(struct thread *td, int indent) argument 1266 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...] |
H A D | subr_sleepqueue.c | 161 static int sleepq_resume_thread(struct sleepqueue *sq, struct thread *td, 284 struct thread *td; local 286 td = curthread; 289 MPASS(td->td_sleepqueue != NULL); 294 KASSERT(td->td_no_sleeping == 0, 295 ("%s: td %p to sleep on wchan %p with sleeping prohibited", 296 __func__, td, wchan)); 310 sq = td->td_sleepqueue; 330 sq = td->td_sleepqueue; 338 LIST_INSERT_HEAD(&sq->sq_free, td 363 struct thread *td; local 409 struct thread *td; local 508 struct thread *td; local 565 struct thread *td; local 604 struct thread *td; local 627 struct thread *td; local 661 struct thread *td; local 721 sleepq_resume_thread(struct sleepqueue *sq, struct thread *td, int pri) argument 826 struct thread *td, *besttd; local 863 struct thread *td, *tdn; local 895 struct thread *td; local 942 sleepq_remove(struct thread *td, void *wchan) argument 981 sleepq_abort(struct thread *td, int intrval) argument 1172 struct thread *td; local [all...] |
/freebsd-10-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);
|
H A D | ibcs2_socksys.c | 61 ibcs2_socksys(td, uap) 62 register struct thread *td; 84 return sys_accept(td, passargs); 86 return sys_bind(td, passargs); 88 return sys_connect(td, passargs); 90 return sys_getpeername(td, passargs); 92 return sys_getsockname(td, passargs); 94 return sys_getsockopt(td, passargs); 96 return sys_listen(td, passargs); 101 return sys_recvfrom(td, passarg [all...] |
/freebsd-10-stable/sys/powerpc/include/ |
H A D | proc.h | 62 struct thread *td = curthread; \ 63 (total) = td->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb); \ 64 (used) = (char *)td->td_kstack + \ 65 td->td_kstack_pages * PAGE_SIZE - \ 66 (char *)&td; \
|
/freebsd-10-stable/sys/arm/arm/ |
H A D | sys_machdep.c | 59 arm32_sync_icache(struct thread *td, void *args) argument 69 td->td_retval[0] = 0; 74 arm32_drain_writebuf(struct thread *td, void *args) argument 78 td->td_retval[0] = 0; 84 arm32_set_tp(struct thread *td, void *args) argument 87 td->td_md.md_tp = (register_t)args; 97 arm32_get_tp(struct thread *td, void *args) argument 101 td->td_retval[0] = td->td_md.md_tp; 103 td [all...] |
H A D | syscall.c | 102 call_trapsignal(struct thread *td, int sig, u_long code) argument 109 trapsignal(td, &ksi); 113 cpu_fetch_syscall_args(struct thread *td, struct syscall_args *sa) argument 119 sa->code = td->td_frame->tf_r7; 120 ap = &td->td_frame->tf_r0; 129 p = td->td_proc; 140 error = copyin((void *)td->td_frame->tf_usr_sp, sa->args + 144 td->td_retval[0] = 0; 145 td->td_retval[1] = 0; 153 syscall(struct thread *td, struc argument 169 struct thread *td = curthread; local [all...] |
/freebsd-10-stable/sys/sys/ |
H A D | syscallsubr.h | 61 int kern___getcwd(struct thread *td, char *buf, enum uio_seg bufseg, 63 int kern_accept(struct thread *td, int s, struct sockaddr **name, 65 int kern_accept4(struct thread *td, int s, struct sockaddr **name, 67 int kern_access(struct thread *td, char *path, enum uio_seg pathseg, 69 int kern_accessat(struct thread *td, int fd, char *path, 71 int kern_adjtime(struct thread *td, struct timeval *delta, 73 int kern_alternate_path(struct thread *td, const char *prefix, const char *path, 75 int kern_bind(struct thread *td, int fd, struct sockaddr *sa); 76 int kern_cap_ioctls_limit(struct thread *td, int fd, u_long *cmds, 78 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 void sched_fork_thread(struct thread *td, struct thread *child); 94 void sched_lend_prio(struct thread *td, u_char prio); 95 void sched_lend_user_prio(struct thread *td, u_char pri); 96 fixpt_t sched_pctcpu(struct thread *td); 97 void sched_prio(struct thread *td, u_char prio); 98 void sched_sleep(struct thread *td, in [all...] |
/freebsd-10-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-10-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-10-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-10-stable/sys/sparc64/include/ |
H A D | proc.h | 62 struct thread *td = curthread; \ 63 (total) = td->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb); \ 64 (used) = (char *)td->td_kstack + \ 65 td->td_kstack_pages * PAGE_SIZE - \ 66 (char *)&td; \
|
/freebsd-10-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-10-stable/sys/amd64/include/ |
H A D | proc.h | 64 struct thread *td = curthread; \ 65 (total) = td->td_kstack_pages * PAGE_SIZE; \ 66 (used) = (char *)td->td_kstack + \ 67 td->td_kstack_pages * PAGE_SIZE - \ 68 (char *)&td; \ 76 int sysarch_ldt(struct thread *td, struct sysarch_args *uap, int uap_space); 77 int amd64_set_ldt_data(struct thread *td, int start, int num,
|
/freebsd-10-stable/usr.bin/csup/ |
H A D | threads.c | 106 struct thread *td; local 109 td = xmalloc(sizeof(struct thread)); 110 td->threads = tds; 111 td->start = start; 112 td->data = data; 117 error = pthread_create(&td->thread, &attr, thread_start, td); 120 LIST_INSERT_HEAD(&tds->threads_running, td, runlist); 128 struct thread *td; local 136 td 165 struct thread *td; local [all...] |
/freebsd-10-stable/sys/ddb/ |
H A D | db_ps.c | 50 static void dumpthread(volatile struct proc *p, volatile struct thread *td, 104 volatile struct thread *td; local 155 FOREACH_THREAD_IN_PROC(p, td) { 156 if (td->td_state == TDS_RUNNING || 157 td->td_state == TDS_RUNQ || 158 td->td_state == TDS_CAN_RUN) 160 if (TD_ON_LOCK(td)) 162 if (TD_IS_SLEEPING(td)) { 163 if (!(td->td_flags & TDF_SINTR)) 168 if (TD_AWAITING_INTR(td)) 247 dumpthread(volatile struct proc *p, volatile struct thread *td, int all) argument 333 struct thread *td; local 419 struct thread *td; local 479 struct thread *td; local [all...] |
/freebsd-10-stable/sys/powerpc/powerpc/ |
H A D | copyinout.c | 177 struct thread *td; local 184 td = curthread; 185 pm = &td->td_proc->p_vmspace->vm_pmap; 188 td->td_pcb->pcb_onfault = NULL; 197 td->td_pcb->pcb_onfault = NULL; 208 td->td_pcb->pcb_onfault = NULL; 215 struct thread *td; local 222 td = curthread; 223 pm = &td->td_proc->p_vmspace->vm_pmap; 226 td 286 struct thread *td; local 314 struct thread *td; local 342 struct thread *td; local 383 struct thread *td; local 411 struct thread *td; local 438 struct thread *td; local 466 struct thread *td; local 494 struct thread *td; local 522 struct thread *td; local 573 struct thread *td; local [all...] |