Lines Matching defs:td

55 protect_setchild(struct thread *td, struct proc *p, int flags)
59 if (p->p_flag & P_SYSTEM || p_cansched(td, p) != 0)
73 protect_setchildren(struct thread *td, struct proc *top, int flags)
82 ret |= protect_setchild(td, p, flags);
107 protect_set(struct thread *td, struct proc *p, void *data)
123 error = priv_check(td, PRIV_VM_MADV_PROTECT);
128 ret = protect_setchildren(td, p, flags);
130 ret = protect_setchild(td, p, flags);
137 reap_acquire(struct thread *td, struct proc *p, void *data __unused)
141 if (p != td->td_proc)
154 reap_release(struct thread *td, struct proc *p, void *data __unused)
158 if (p != td->td_proc)
169 reap_status(struct thread *td, struct proc *p, void *data)
204 reap_getpids(struct thread *td, struct proc *p, void *data)
355 reap_kill_children(struct thread *td, struct proc *reaper,
364 error1 = p_cansignal(td, p2, rk->rk_sig);
385 reap_kill_subtree_once(struct thread *td, struct proc *p, struct proc *reaper,
435 if (p2 == td->td_proc) {
490 reap_kill_subtree(struct thread *td, struct proc *p, struct proc *reaper,
504 PROC_LOCK(td->td_proc);
505 if ((td->td_proc->p_flag2 & P2_WEXIT) != 0) {
506 PROC_UNLOCK(td->td_proc);
509 PROC_UNLOCK(td->td_proc);
510 while (reap_kill_subtree_once(td, p, reaper, &pids, w))
529 reap_kill_sapblk(struct thread *td __unused, void *data)
538 reap_kill(struct thread *td, struct proc *p, void *data)
548 if (CAP_TRACING(td))
550 if (IN_CAPABILITY_MODE(td))
563 ksi.ksi_pid = td->td_proc->p_pid;
564 ksi.ksi_uid = td->td_ucred->cr_ruid;
569 reap_kill_children(td, reaper, rk, &ksi, &error);
571 w.cr = crhold(td->td_ucred);
576 reap_kill_subtree(td, p, reaper, &w);
584 trace_ctl(struct thread *td, struct proc *p, void *data)
601 if (td->td_proc != p)
612 if (td->td_proc != p)
626 trace_status(struct thread *td, struct proc *p, void *data)
644 trapcap_ctl(struct thread *td, struct proc *p, void *data)
665 trapcap_status(struct thread *td, struct proc *p, void *data)
676 no_new_privs_ctl(struct thread *td, struct proc *p, void *data)
690 no_new_privs_status(struct thread *td, struct proc *p, void *data)
699 protmax_ctl(struct thread *td, struct proc *p, void *data)
725 protmax_status(struct thread *td, struct proc *p, void *data)
747 aslr_ctl(struct thread *td, struct proc *p, void *data)
773 aslr_status(struct thread *td, struct proc *p, void *data)
806 stackgap_ctl(struct thread *td, struct proc *p, void *data)
846 stackgap_status(struct thread *td, struct proc *p, void *data)
861 wxmap_ctl(struct thread *td, struct proc *p, void *data)
899 wxmap_status(struct thread *td, struct proc *p, void *data)
928 pdeathsig_ctl(struct thread *td, struct proc *p, void *data)
933 if (p != td->td_proc || (signum != 0 && !_SIG_VALID(signum)))
940 pdeathsig_status(struct thread *td, struct proc *p, void *data)
942 if (p != td->td_proc)
949 logsigexit_ctl(struct thread *td, struct proc *p, void *data)
974 logsigexit_status(struct thread *td, struct proc *p, void *data)
1158 sys_procctl(struct thread *td, struct procctl_args *uap)
1170 return (cpu_procctl(td, uap->idtype, uap->id,
1185 error = kern_procctl(td, uap->idtype, uap->id, uap->com, &x);
1197 kern_procctl_single(struct thread *td, struct proc *p, int com, void *data)
1201 return (procctl_cmds_info[com].exec(td, p, data));
1205 kern_procctl(struct thread *td, idtype_t idtype, id_t id, int com, void *data)
1220 sapblk = cmd_info->sapblk(td, data);
1239 p = td->td_proc;
1249 error = cmd_info->need_candebug ? p_candebug(td, p) :
1250 p_cansee(td, p);
1253 error = kern_procctl_single(td, p, com, data);
1275 (cmd_info->need_candebug ? p_candebug(td, p) :
1276 p_cansee(td, p)) != 0) {
1280 error = kern_procctl_single(td, p, com, data);