/freebsd-9.3-release/sys/arm/arm/ |
H A D | sys_machdep.c | 63 arm32_sync_icache(struct thread *td, void *args) argument 73 td->td_retval[0] = 0; 78 arm32_drain_writebuf(struct thread *td, void *args) argument 82 td->td_retval[0] = 0; 88 arm32_set_tp(struct thread *td, void *args) argument 91 td->td_md.md_tp = (register_t)args; 96 arm32_get_tp(struct thread *td, void *args) argument 99 td->td_retval[0] = td->td_md.md_tp; 104 sysarch(td, ua [all...] |
/freebsd-9.3-release/sys/compat/linux/ |
H A D | linux_mib.h | 37 void linux_get_osname(struct thread *td, char *dst); 39 void linux_get_osrelease(struct thread *td, char *dst); 41 int linux_get_oss_version(struct thread *td); 43 int linux_kernver(struct thread *td);
|
/freebsd-9.3-release/sys/kern/ |
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 312 maybe_preempt(struct thread *td) argument 479 struct thread *td; local 592 updatepri(struct thread *td) argument 617 resetpriority(struct thread *td) argument 635 resetpriority_thread(struct thread *td) argument 727 sched_clock(struct thread *td) argument 760 sched_exit(struct proc *p, struct thread *td) argument 767 sched_exit_thread(FIRST_THREAD_IN_PROC(p), td); local 771 sched_exit_thread(struct thread *td, struct thread *child) argument 786 sched_fork(struct thread *td, struct thread *childtd) argument 792 sched_fork_thread(struct thread *td, struct thread *childtd) argument 809 struct thread *td; local 822 sched_class(struct thread *td, int class) argument 832 sched_priority(struct thread *td, u_char prio) argument 862 sched_lend_prio(struct thread *td, u_char prio) argument 878 sched_unlend_prio(struct thread *td, u_char prio) argument 895 sched_prio(struct thread *td, u_char prio) argument 922 sched_user_prio(struct thread *td, u_char prio) argument 933 sched_lend_user_prio(struct thread *td, u_char prio) argument 946 sched_sleep(struct thread *td, int pri) argument 959 sched_switch(struct thread *td, struct thread *newtd, int flags) argument 1088 sched_wakeup(struct thread *td) argument 1229 sched_pickcpu(struct thread *td) argument 1255 sched_add(struct thread *td, int flags) argument 1408 sched_rem(struct thread *td) argument 1440 struct thread *td; local 1483 sched_preempt(struct thread *td) argument 1496 sched_userret(struct thread *td) argument 1518 sched_bind(struct thread *td, int cpu) argument 1538 sched_unbind(struct thread* td) argument 1546 sched_is_bound(struct thread *td) argument 1553 sched_relinquish(struct thread *td) argument 1579 sched_pctcpu(struct thread *td) argument 1594 sched_pctcpu_delta(struct thread *td) argument 1654 sched_throw(struct thread *td) argument 1680 sched_fork_exit(struct thread *td) argument 1695 sched_tdname(struct thread *td) argument 1712 sched_clear_tdname(struct thread *td) argument 1722 sched_affinity(struct thread *td) argument [all...] |
H A D | subr_trap.c | 101 userret(struct thread *td, struct trapframe *frame) argument 103 struct proc *p = td->td_proc; 105 CTR3(KTR_SYSC, "userret: thread %p (pid %d, %s)", td, p->p_pid, 106 td->td_name); 113 thread_lock(td); 114 if (SIGPENDING(td) && ((td->td_flags & TDF_NEEDSIGCHK) == 0 || 115 (td->td_flags & TDF_ASTPENDING) == 0)) 117 thread_unlock(td); 122 KTRUSERRET(td); 174 struct thread *td; local [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); 70 td->td_dbgflags &= ~TDB_USERWR; 71 td->td_dbgflags |= TDB_SCE; 75 error = (p->p_sysent->sv_fetch_syscall_args)(td, sa); 77 if (KTRPOINT(td, KTR_SYSCALL)) 82 "syscall: td 167 syscallret(struct thread *td, int error, struct syscall_args *sa __unused) argument [all...] |
H A D | kern_thread.c | 134 struct thread *td; local 136 td = (struct thread *)mem; 137 td->td_state = TDS_INACTIVE; 138 td->td_oncpu = NOCPU; 140 td->td_tid = tid_alloc(); 147 td->td_critnest = 1; 148 td->td_lend_user_pri = PRI_MAX; 149 EVENTHANDLER_INVOKE(thread_ctor, td); 151 audit_thread_alloc(td); 153 umtx_thread_alloc(td); 163 struct thread *td; local 203 struct thread *td; local 224 struct thread *td; local 244 proc_linkup0(struct proc *p, struct thread *td) argument 251 proc_linkup(struct proc *p, struct thread *td) argument 292 thread_zombie(struct thread *td) argument 303 thread_stash(struct thread *td) argument 343 struct thread *td; local 358 thread_alloc_stack(struct thread *td, int pages) argument 373 thread_free(struct thread *td) argument 399 struct thread *td; local 509 struct thread *td; local 534 thread_link(struct thread *td, struct proc *p) argument 559 thread_unthread(struct thread *td) argument 572 thread_unlink(struct thread *td) argument 617 struct thread *td; local 768 struct thread *td; local 863 thread_suspend_switch(struct thread *td) argument 892 thread_suspend_one(struct thread *td) argument 906 thread_unsuspend_one(struct thread *td) argument 924 struct thread *td; local 959 struct thread *td; local 993 struct thread *td; local 1008 struct thread *td; local 1042 tidhash_add(struct thread *td) argument 1050 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 291 turnstile_adjust_thread(struct turnstile *ts, struct thread *td) argument 421 turnstile_adjust(struct thread *td, u_char oldpri) argument 641 struct thread *td, *owner; local 679 struct thread *td, *td1; local 769 struct thread *td; local 821 struct thread *td; local 871 struct thread *td; local 954 struct thread *td; local 1027 print_thread(struct thread *td, const char *prefix) argument 1038 struct thread *td; local 1102 print_lockchain(struct thread *td, const char *prefix) argument 1152 struct thread *td; local 1165 struct thread *td; local 1188 print_sleepchain(struct thread *td, const char *prefix) argument 1237 struct thread *td; local 1251 print_waiter(struct thread *td, int indent) argument 1270 struct thread *td; local [all...] |
H A D | kern_synch.c | 76 #define KTDSTATE(td) \ 77 (((td)->td_inhibitors & TDI_SLEEPING) != 0 ? "sleep" : \ 78 ((td)->td_inhibitors & TDI_SUSPENDED) != 0 ? "suspended" : \ 79 ((td)->td_inhibitors & TDI_SWAPPED) != 0 ? "swapped" : \ 80 ((td)->td_inhibitors & TDI_LOCK) != 0 ? "blocked" : \ 81 ((td)->td_inhibitors & TDI_IWAIT) != 0 ? "iwait" : "yielding") 151 struct thread *td; local 157 td = curthread; 158 p = td->td_proc; 160 if (KTRPOINT(td, KTR_CS 268 struct thread *td; local 426 struct thread *td; local 507 setrunnable(struct thread *td) argument 595 struct thread *td; local 613 sys_yield(struct thread *td, struct yield_args *uap) argument [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 | 163 static int sleepq_resume_thread(struct sleepqueue *sq, struct thread *td, 286 struct thread *td; local 288 td = curthread; 291 MPASS(td->td_sleepqueue != NULL); 296 KASSERT(!(td->td_pflags & TDP_NOSLEEPING), 311 sq = td->td_sleepqueue; 331 sq = td->td_sleepqueue; 339 LIST_INSERT_HEAD(&sq->sq_free, td->td_sleepqueue, sq_hash); 341 thread_lock(td); 342 TAILQ_INSERT_TAIL(&sq->sq_blocked[queue], td, td_slp 363 struct thread *td; local 401 struct thread *td; local 494 struct thread *td; local 551 struct thread *td; local 590 struct thread *td; local 613 struct thread *td; local 647 struct thread *td; local 707 sleepq_resume_thread(struct sleepqueue *sq, struct thread *td, int pri) argument 812 struct thread *td, *besttd; local 849 struct thread *td, *tdn; local 881 struct thread *td; local 947 sleepq_remove(struct thread *td, void *wchan) argument 986 sleepq_abort(struct thread *td, int intrval) argument 1177 struct thread *td; local [all...] |
/freebsd-9.3-release/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-9.3-release/sys/powerpc/booke/ |
H A D | copyinout.c | 84 struct thread *td; local 90 td = curthread; 93 td->td_pcb->pcb_onfault = NULL; 99 td->td_pcb->pcb_onfault = NULL; 106 struct thread *td; local 112 td = curthread; 115 td->td_pcb->pcb_onfault = NULL; 121 td->td_pcb->pcb_onfault = NULL; 128 struct thread *td; local 138 td 172 struct thread *td; local 194 struct thread *td; local 224 struct thread *td; local 247 struct thread *td; local 284 struct thread *td; local [all...] |
/freebsd-9.3-release/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-9.3-release/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-9.3-release/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-9.3-release/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-9.3-release/tools/regression/tls/ttls4/ |
H A D | ttls4.c | 28 pthread_t td; local 32 pthread_create(&td, NULL, f1, NULL); 33 pthread_join(td, NULL); 37 pthread_create(&td, NULL, f1, NULL); 38 pthread_join(td, NULL);
|
/freebsd-9.3-release/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-9.3-release/sys/sys/ |
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...] |
H A D | syscallsubr.h | 59 int kern___getcwd(struct thread *td, u_char *buf, enum uio_seg bufseg, 61 int kern_accept(struct thread *td, int s, struct sockaddr **name, 63 int kern_access(struct thread *td, char *path, enum uio_seg pathseg, 65 int kern_accessat(struct thread *td, int fd, char *path, 67 int kern_adjtime(struct thread *td, struct timeval *delta, 69 int kern_alternate_path(struct thread *td, const char *prefix, const char *path, 71 int kern_bind(struct thread *td, int fd, struct sockaddr *sa); 72 int kern_chdir(struct thread *td, char *path, enum uio_seg pathseg); 73 int kern_chmod(struct thread *td, char *path, enum uio_seg pathseg, 75 int kern_chown(struct thread *td, cha [all...] |
/freebsd-9.3-release/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-9.3-release/lib/libthr/thread/ |
H A D | thr_affinity.c | 42 _pthread_setaffinity_np(pthread_t td, size_t cpusetsize, const cpuset_t *cpusetp) argument 48 if (td == curthread) { 53 } else if ((error = _thr_find_thread(curthread, td, 0)) == 0) { 54 tid = TID(td); 59 THR_THREAD_UNLOCK(curthread, td); 65 _pthread_getaffinity_np(pthread_t td, size_t cpusetsize, cpuset_t *cpusetp) argument 71 if (td == curthread) { 76 } else if ((error = _thr_find_thread(curthread, td, 0)) == 0) { 77 tid = TID(td); 82 THR_THREAD_UNLOCK(curthread, td); [all...] |