Lines Matching refs:curp
110 int donice(struct proc *curp, struct proc *chgp, int n);
112 static int do_background_thread(struct proc *curp, int priority);
133 proc_t curp;
144 proc_t curp;
155 getpriority(struct proc *curp, struct getpriority_args *uap, register_t *retval)
169 p = curp;
186 pg = proc_pgrp(curp);
257 error = donice(pun->curp, p, pun->prio);
278 error = donice(pun->curp, p, pun->prio);
298 setpriority(struct proc *curp, struct setpriority_args *uap, __unused register_t *retval)
316 p = curp;
323 error = donice(curp, p, uap->prio);
334 pg = proc_pgrp(curp);
338 ppgrp.curp = curp;
355 punice.curp = curp;
371 error = do_background_thread(curp, uap->prio);
392 donice(struct proc *curp, struct proc *chgp, int n)
398 ucred = kauth_cred_proc_ref(curp);
411 if (n < chgp->p_nice && suser(ucred, &curp->p_acflag)) {
416 error = mac_proc_check_sched(curp, chgp);
436 do_background_thread(struct proc *curp, int priority)
470 proc_fdlock(curp);
471 fdp = curp->p_fd;
487 proc_fdunlock(curp);