proc_compare.c (76169) | proc_compare.c (83366) |
---|---|
1/*- 2 * Copyright (c) 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 22 unchanged lines hidden (view full) --- 31 * SUCH DAMAGE. 32 */ 33 34#ifndef lint 35#if 0 36static char sccsid[] = "@(#)proc_compare.c 8.2 (Berkeley) 9/23/93"; 37#endif 38static const char rcsid[] = | 1/*- 2 * Copyright (c) 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 22 unchanged lines hidden (view full) --- 31 * SUCH DAMAGE. 32 */ 33 34#ifndef lint 35#if 0 36static char sccsid[] = "@(#)proc_compare.c 8.2 (Berkeley) 9/23/93"; 37#endif 38static const char rcsid[] = |
39 "$FreeBSD: head/usr.bin/w/proc_compare.c 76169 2001-05-01 08:46:02Z markm $"; | 39 "$FreeBSD: head/usr.bin/w/proc_compare.c 83366 2001-09-12 08:38:13Z julian $"; |
40#endif /* not lint */ 41 42#include <sys/param.h> 43#include <sys/lock.h> 44#include <sys/time.h> 45#include <sys/user.h> 46 47#include "extern.h" --- 64 unchanged lines hidden (view full) --- 112 */ 113 if (p2->ki_slptime > p1->ki_slptime) 114 return (0); 115 if (p1->ki_slptime > p2->ki_slptime) 116 return (1); 117 /* 118 * favor one sleeping in a non-interruptible sleep 119 */ | 40#endif /* not lint */ 41 42#include <sys/param.h> 43#include <sys/lock.h> 44#include <sys/time.h> 45#include <sys/user.h> 46 47#include "extern.h" --- 64 unchanged lines hidden (view full) --- 112 */ 113 if (p2->ki_slptime > p1->ki_slptime) 114 return (0); 115 if (p1->ki_slptime > p2->ki_slptime) 116 return (1); 117 /* 118 * favor one sleeping in a non-interruptible sleep 119 */ |
120 if (p1->ki_sflag & PS_SINTR && (p2->ki_sflag & PS_SINTR) == 0) | 120 if (p1->ki_tdflags & TDF_SINTR && (p2->ki_tdflags & TDF_SINTR) == 0) |
121 return (1); | 121 return (1); |
122 if (p2->ki_sflag & PS_SINTR && (p1->ki_sflag & PS_SINTR) == 0) | 122 if (p2->ki_tdflags & TDF_SINTR && (p1->ki_tdflags & TDF_SINTR) == 0) |
123 return (0); 124 return (p2->ki_pid > p1->ki_pid); /* tie - return highest pid */ 125} | 123 return (0); 124 return (p2->ki_pid > p1->ki_pid); /* tie - return highest pid */ 125} |