Searched refs:td (Results 1 - 25 of 998) sorted by relevance

1234567891011>>

/freebsd-11.0-release/sys/compat/linuxkpi/common/include/linux/
H A Dcompat.h37 void linux_set_current(struct thread *td, struct task_struct *t);
38 void linux_clear_current(struct thread *td);
/freebsd-11.0-release/sys/kern/
H A Dsubr_trap.c96 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
208 struct thread *td; local
[all...]
H A Dsched_4bsd.c85 #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
316 maybe_preempt(struct thread *td) argument
483 struct thread *td; local
596 updatepri(struct thread *td) argument
621 resetpriority(struct thread *td) argument
640 resetpriority_thread(struct thread *td) argument
731 sched_clock(struct thread *td) argument
764 sched_exit(struct proc *p, struct thread *td) argument
771 sched_exit_thread(FIRST_THREAD_IN_PROC(p), td); local
775 sched_exit_thread(struct thread *td, struct thread *child) argument
791 sched_fork(struct thread *td, struct thread *childtd) argument
797 sched_fork_thread(struct thread *td, struct thread *childtd) argument
817 struct thread *td; local
830 sched_class(struct thread *td, int class) argument
840 sched_priority(struct thread *td, u_char prio) argument
870 sched_lend_prio(struct thread *td, u_char prio) argument
886 sched_unlend_prio(struct thread *td, u_char prio) argument
903 sched_prio(struct thread *td, u_char prio) argument
930 sched_user_prio(struct thread *td, u_char prio) argument
941 sched_lend_user_prio(struct thread *td, u_char prio) argument
954 sched_sleep(struct thread *td, int pri) argument
967 sched_switch(struct thread *td, struct thread *newtd, int flags) argument
1097 sched_wakeup(struct thread *td) argument
1238 sched_pickcpu(struct thread *td) argument
1264 sched_add(struct thread *td, int flags) argument
1417 sched_rem(struct thread *td) argument
1449 struct thread *td; local
1492 sched_preempt(struct thread *td) argument
1505 sched_userret(struct thread *td) argument
1527 sched_bind(struct thread *td, int cpu) argument
1547 sched_unbind(struct thread* td) argument
1555 sched_is_bound(struct thread *td) argument
1562 sched_relinquish(struct thread *td) argument
1588 sched_pctcpu(struct thread *td) argument
1603 sched_pctcpu_delta(struct thread *td) argument
1632 sched_estcpu(struct thread *td) argument
1666 sched_throw(struct thread *td) argument
1694 sched_fork_exit(struct thread *td) argument
1709 sched_tdname(struct thread *td) argument
1726 sched_clear_tdname(struct thread *td) argument
1736 sched_affinity(struct thread *td) argument
[all...]
H A Dkern_thread.c80 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
226 struct thread *td; local
246 proc_linkup0(struct proc *p, struct thread *td) argument
253 proc_linkup(struct proc *p, struct thread *td) argument
294 thread_zombie(struct thread *td) argument
305 thread_stash(struct thread *td) argument
344 struct thread *td; local
360 thread_alloc_stack(struct thread *td, int pages) argument
375 thread_free(struct thread *td) argument
400 thread_cow_get(struct thread *newtd, struct thread *td) argument
409 thread_cow_free(struct thread *td) argument
419 thread_cow_update(struct thread *td) argument
458 struct thread *td; local
569 struct thread *td; local
592 thread_link(struct thread *td, struct proc *p) argument
618 thread_unlink(struct thread *td) argument
719 struct thread *td; local
850 struct thread *td; local
895 struct thread *td; local
987 thread_suspend_switch(struct thread *td, struct proc *p) argument
1016 thread_suspend_one(struct thread *td) argument
1031 thread_unsuspend_one(struct thread *td, struct proc *p, bool boundary) argument
1055 struct thread *td; local
1094 struct thread *td; local
1141 struct thread *td; local
1156 struct thread *td; local
1190 tidhash_add(struct thread *td) argument
1198 tidhash_remove(struct thread *td) argument
[all...]
H A Dsubr_syscall.c55 syscallenter(struct thread *td, struct syscall_args *sa) argument
61 p = td->td_proc;
63 td->td_pticks = 0;
64 if (td->td_cowgen != p->p_cowgen)
65 thread_cow_update(td);
67 if (traced || td->td_dbgflags & TDB_USERWR) {
69 td->td_dbgflags &= ~TDB_USERWR;
71 td->td_dbgflags |= TDB_SCE;
74 error = (p->p_sysent->sv_fetch_syscall_args)(td, sa);
76 if (KTRPOINT(td, KTR_SYSCAL
165 syscallret(struct thread *td, int error, struct syscall_args *sa) argument
[all...]
H A Dkern_synch.c69 #define KTDSTATE(td) \
70 (((td)->td_inhibitors & TDI_SLEEPING) != 0 ? "sleep" : \
71 ((td)->td_inhibitors & TDI_SUSPENDED) != 0 ? "suspended" : \
72 ((td)->td_inhibitors & TDI_SWAPPED) != 0 ? "swapped" : \
73 ((td)->td_inhibitors & TDI_LOCK) != 0 ? "blocked" : \
74 ((td)->td_inhibitors & TDI_IWAIT) != 0 ? "iwait" : "yielding")
138 struct thread *td; local
145 td = curthread;
146 p = td->td_proc;
148 if (KTRPOINT(td, KTR_CS
248 struct thread *td; local
399 struct thread *td; local
477 setrunnable(struct thread *td) argument
566 struct thread *td; local
584 sys_yield(struct thread *td, struct yield_args *uap) argument
[all...]
H A Dsubr_turnstile.c160 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 Dsubr_sleepqueue.c163 static int sleepq_resume_thread(struct sleepqueue *sq, struct thread *td,
301 struct thread *td; local
303 td = curthread;
306 MPASS(td->td_sleepqueue != NULL);
311 KASSERT(td->td_no_sleeping == 0,
312 ("%s: td %p to sleep on wchan %p with sleeping prohibited",
313 __func__, td, wchan));
327 sq = td->td_sleepqueue;
347 sq = td->td_sleepqueue;
355 LIST_INSERT_HEAD(&sq->sq_free, td
380 struct thread *td; local
421 struct thread *td; local
521 struct thread *td; local
578 struct thread *td; local
618 struct thread *td; local
641 struct thread *td; local
675 struct thread *td; local
735 sleepq_resume_thread(struct sleepqueue *sq, struct thread *td, int pri) argument
840 struct thread *td, *besttd; local
877 struct thread *td; local
908 struct thread *td; local
974 sleepq_remove(struct thread *td, void *wchan) argument
1013 sleepq_abort(struct thread *td, int intrval) argument
1061 struct thread *td, *td_next; local
1320 struct thread *td; local
[all...]
H A Dkern_idle.c58 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.0-release/sys/i386/ibcs2/
H A Dibcs2_util.h56 #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 Dibcs2_socksys.c61 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-11.0-release/sys/powerpc/include/
H A Dproc.h62 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-11.0-release/sys/riscv/riscv/
H A Dvm_machdep.c114 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.0-release/sys/compat/cloudabi/
H A Dcloudabi_thread.c40 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_tcb_set(struct thread *td, argument
67 return (cpu_set_user_tls(td, uap->tcb));
71 cloudabi_sys_thread_yield(struct thread *td, argument
75 sched_relinquish(td);
/freebsd-11.0-release/sys/mips/mips/
H A Dpm_machdep.c87 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.0-release/sys/i386/i386/
H A Dio.c38 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.0-release/sys/amd64/amd64/
H A Dio.c38 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.0-release/tools/regression/pthread/unwind/
H A Dsem_wait_cancel.cpp26 pthread_t td; local
29 pthread_create(&td, NULL, thr, NULL);
31 pthread_cancel(td);
32 pthread_join(td, NULL);
H A Dcatch_pthread_exit.cpp26 pthread_t td; local
28 pthread_create(&td, NULL, thr_routine, NULL);
29 pthread_join(td, NULL);
H A Dthread_normal_exit.cpp22 pthread_t td; local
24 pthread_create(&td, NULL, thr_routine, NULL);
25 pthread_join(td, NULL);
/freebsd-11.0-release/sys/powerpc/powerpc/
H A Dcopyinout.c175 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.0-release/sys/sys/
H A Dsched.h83 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...]
H A Dsyscallsubr.h62 int kern___getcwd(struct thread *td, char *buf, enum uio_seg bufseg,
64 int kern_accept(struct thread *td, int s, struct sockaddr **name,
66 int kern_accept4(struct thread *td, int s, struct sockaddr **name,
68 int kern_accessat(struct thread *td, int fd, char *path,
70 int kern_adjtime(struct thread *td, struct timeval *delta,
72 int kern_alternate_path(struct thread *td, const char *prefix, const char *path,
74 int kern_bindat(struct thread *td, int dirfd, int fd, struct sockaddr *sa);
75 int kern_cap_ioctls_limit(struct thread *td, int fd, u_long *cmds,
77 int kern_cap_rights_limit(struct thread *td, int fd, cap_rights_t *rights);
78 int kern_chdir(struct thread *td, cha
[all...]
/freebsd-11.0-release/tools/regression/tls/ttls4/
H A Dttls4.c31 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.0-release/sys/sparc64/include/
H A Dproc.h62 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; \

Completed in 285 milliseconds

1234567891011>>