From 929789b42c7f8100c20bc2ccdd4536d8eea95128 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Wed, 14 Apr 2004 09:34:17 +0000 Subject: [PATCH] Include instead of depending on namespace pollution in for the definition of TDF_SINTR. Fixed anachronous spelling of TDF_SINTR in a comment Demangled VCS ids. There were 2 misplaced copies of $FreeBSD$ and of the include before it. The vendor id infrastructure was edited. Fixed the only other remaining style bug since rev.1.1 (expansion of struct member names made a line too long). --- usr.bin/w/proc_compare.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/usr.bin/w/proc_compare.c b/usr.bin/w/proc_compare.c index 62ff0d2f9ffa..8e807d161df2 100644 --- a/usr.bin/w/proc_compare.c +++ b/usr.bin/w/proc_compare.c @@ -31,15 +31,17 @@ * SUCH DAMAGE. */ -#include - -__FBSDID("$FreeBSD$"); - +#if 0 #ifndef lint -static const char sccsid[] = "@(#)proc_compare.c 8.2 (Berkeley) 9/23/93"; +static char sccsid[] = "@(#)proc_compare.c 8.2 (Berkeley) 9/23/93"; +#endif /* not lint */ #endif +#include +__FBSDID("$FreeBSD$"); + #include +#include #include #include @@ -55,7 +57,7 @@ static const char sccsid[] = "@(#)proc_compare.c 8.2 (Berkeley) 9/23/93"; * with the highest cpu utilization is picked (p_estcpu). Ties are * broken by picking the highest pid. * 3) The sleeper with the shortest sleep time is next. With ties, - * we pick out just "short-term" sleepers (PS_SINTR == 0). + * we pick out just "short-term" sleepers (TDF_SINTR == 0). * 4) Further ties are broken by picking the highest pid. * * If you change this, be sure to consider making the change in the kernel @@ -64,10 +66,6 @@ static const char sccsid[] = "@(#)proc_compare.c 8.2 (Berkeley) 9/23/93"; * TODO - consider whether pctcpu should be used. */ -#include - -__FBSDID("$FreeBSD$"); - #define ISRUN(p) (((p)->ki_stat == SRUN) || ((p)->ki_stat == SIDL)) #define TESTAB(a, b) ((a)<<1 | (b)) #define ONLYA 2 @@ -96,7 +94,7 @@ proc_compare(struct kinfo_proc *p1, struct kinfo_proc *p2) return (1); if (p1->ki_estcpu > p2->ki_estcpu) return (0); - return (p2->ki_pid > p1->ki_pid); /* tie - return highest pid */ + return (p2->ki_pid > p1->ki_pid); /* tie - return highest pid */ } /* * weed out zombies