Lines Matching defs:psp
69 * by the procset structure pointed to by psp. funcp points to a
84 dotoprocs(procset_t *psp, int (*funcp)(), char *arg)
96 error = checkprocset(psp);
107 if (psp->p_lid == P_MYID) {
108 psp->p_lid = getmyid(psp->p_lidtype);
110 if (psp->p_rid == P_MYID) {
111 psp->p_rid = getmyid(psp->p_ridtype);
115 * If psp only acts on a single proc, we can reduce pidlock hold time
127 if (psp->p_op == POP_AND) {
128 if (((psp->p_lidtype == P_PID) && (psp->p_ridtype == P_ALL)) ||
129 ((psp->p_ridtype == P_PID) && (psp->p_lidtype == P_ALL))) {
132 pid = (psp->p_lidtype == P_PID) ?
133 psp->p_lid : psp->p_rid;
179 procinset(prp, psp) == 0) {
213 checkprocset(procset_t *psp)
215 switch (psp->p_lidtype) {
235 switch (psp->p_ridtype) {
255 switch (psp->p_op) {
270 * set specified by psp, otherwise 0 is returned. If either process set operand
281 procinset(proc_t *pp, procset_t *psp)
291 switch (psp->p_lidtype) {
295 if (getlwpptr(psp->p_lid) != NULL)
300 if (pp->p_pid == psp->p_lid)
305 if (pp->p_ppid == psp->p_lid)
310 if (pp->p_pgrp == psp->p_lid)
316 if (pp->p_sessp->s_sid == psp->p_lid)
325 if (tp->t_cid == psp->p_lid)
330 if (pp->p_task->tk_tkid == psp->p_lid)
336 if (crgetuid(pp->p_cred) == psp->p_lid)
343 if (crgetgid(pp->p_cred) == psp->p_lid)
349 if (pp->p_task->tk_proj->kpj_id == psp->p_lid)
354 if (pp->p_pool->pool_id == psp->p_lid)
359 if (pp->p_zone->zone_id == psp->p_lid)
364 if (PRCTID(pp) == psp->p_lid)
381 switch (psp->p_ridtype) {
385 if (getlwpptr(psp->p_rid) != NULL)
390 if (pp->p_pid == psp->p_rid)
395 if (pp->p_ppid == psp->p_rid)
400 if (pp->p_pgrp == psp->p_rid)
406 if (pp->p_sessp->s_sid == psp->p_rid)
412 if (pp->p_task->tk_tkid == psp->p_rid)
420 if (tp->t_cid == psp->p_rid)
426 if (crgetuid(pp->p_cred) == psp->p_rid)
433 if (crgetgid(pp->p_cred) == psp->p_rid)
439 if (pp->p_task->tk_proj->kpj_id == psp->p_rid)
444 if (pp->p_pool->pool_id == psp->p_rid)
449 if (pp->p_zone->zone_id == psp->p_rid)
454 if (PRCTID(pp) == psp->p_rid)
471 switch (psp->p_op) {
511 * by tp is in the process set specified by psp and is not in
519 lwpinset(proc_t *pp, procset_t *psp, kthread_t *tp, int *done)
535 switch (psp->p_lidtype) {
538 if (tp->t_tid == psp->p_lid)
543 if (pp->p_pid == psp->p_lid)
548 if (pp->p_ppid == psp->p_lid)
553 if (pp->p_pgrp == psp->p_lid)
559 if (pp->p_sessp->s_sid == psp->p_lid)
565 if (pp->p_task->tk_tkid == psp->p_lid)
570 if (tp->t_cid == psp->p_lid)
576 if (crgetuid(pp->p_cred) == psp->p_lid)
583 if (crgetgid(pp->p_cred) == psp->p_lid)
589 if (pp->p_task->tk_proj->kpj_id == psp->p_lid)
594 if (pp->p_pool->pool_id == psp->p_lid)
599 if (pp->p_zone->zone_id == psp->p_lid)
604 if (PRCTID(pp) == psp->p_lid)
621 switch (psp->p_ridtype) {
624 if (tp->t_tid == psp->p_rid)
629 if (pp->p_pid == psp->p_rid)
634 if (pp->p_ppid == psp->p_rid)
639 if (pp->p_pgrp == psp->p_rid)
645 if (pp->p_sessp->s_sid == psp->p_rid)
651 if (pp->p_task->tk_tkid == psp->p_rid)
656 if (tp->t_cid == psp->p_rid)
662 if (crgetuid(pp->p_cred) == psp->p_rid)
669 if (crgetgid(pp->p_cred) == psp->p_rid)
675 if (pp->p_task->tk_proj->kpj_id == psp->p_rid)
680 if (pp->p_pool->pool_id == psp->p_rid)
685 if (pp->p_zone->zone_id == psp->p_rid)
690 if (PRCTID(pp) == psp->p_rid)
710 switch (psp->p_op) {
756 cur_inset_only(procset_t *psp)
758 if (((psp->p_lidtype == P_PID &&
759 (psp->p_lid == P_MYID ||
760 psp->p_lid == ttoproc(curthread)->p_pid)) ||
761 ((psp->p_lidtype == P_LWPID) &&
762 (psp->p_lid == P_MYID ||
763 psp->p_lid == curthread->t_tid))) &&
764 psp->p_op == POP_AND && psp->p_ridtype == P_ALL)
767 if (((psp->p_ridtype == P_PID &&
768 (psp->p_rid == P_MYID ||
769 psp->p_rid == ttoproc(curthread)->p_pid)) ||
770 ((psp->p_ridtype == P_LWPID) &&
771 (psp->p_rid == P_MYID ||
772 psp->p_rid == curthread->t_tid))) &&
773 psp->p_op == POP_AND && psp->p_lidtype == P_ALL)
869 * pointed to by psp. If funcp is non-NULL then it points to a function
881 dotolwp(procset_t *psp, int (*funcp)(), char *arg)
892 error = checkprocset(psp);
905 if (psp->p_lid == P_MYID) {
906 psp->p_lid = getmyid(psp->p_lidtype);
908 if (psp->p_rid == P_MYID) {
909 psp->p_rid = getmyid(psp->p_ridtype);
915 if (procinset(pp, psp) ||
922 if (lwpinset(pp, psp, tp, &done)) {