Lines Matching defs:p1
143 static int proc_compare(proc_t p1, proc_t p2);
2882 * Returns 1 if p2 is "better" than p1
2905 proc_compare(proc_t p1, proc_t p2)
2909 if (p1 == NULL)
2914 switch (TESTAB(ISRUN(p1), ISRUN(p2))) {
2925 if (p2->p_estcpu > p1->p_estcpu)
2927 if (p1->p_estcpu > p2->p_estcpu)
2930 return (p2->p_pid > p1->p_pid); /* tie - return highest pid */
2935 switch (TESTAB(p1->p_stat == SZOMB, p2->p_stat == SZOMB)) {
2941 return (p2->p_pid > p1->p_pid); /* tie - return highest pid */
2948 if (p2->p_slptime > p1->p_slptime)
2950 if (p1->p_slptime > p2->p_slptime)
2953 return (p2->p_pid > p1->p_pid); /* tie - return highest pid */