Lines Matching defs:p2
143 static int proc_compare(proc_t p1, proc_t p2);
2914 * Returns 1 if p2 is "better" than p1
2932 * Locks: pgrp_lock(p2) held on call to this function
2933 * tty_lock(tp) for p2's tty, for which p2 is the foreground
2937 proc_compare(proc_t p1, proc_t p2)
2946 switch (TESTAB(ISRUN(p1), ISRUN(p2))) {
2957 if (p2->p_estcpu > p1->p_estcpu)
2959 if (p1->p_estcpu > p2->p_estcpu)
2962 return (p2->p_pid > p1->p_pid); /* tie - return highest pid */
2967 switch (TESTAB(p1->p_stat == SZOMB, p2->p_stat == SZOMB)) {
2973 return (p2->p_pid > p1->p_pid); /* tie - return highest pid */
2980 if (p2->p_slptime > p1->p_slptime)
2982 if (p1->p_slptime > p2->p_slptime)
2985 return (p2->p_pid > p1->p_pid); /* tie - return highest pid */