diff options
-rw-r--r-- | contrib/top/loadavg.h | 2 | ||||
-rw-r--r-- | sys/alpha/alpha/machdep.c | 4 | ||||
-rw-r--r-- | usr.bin/top/machine.c | 8 |
3 files changed, 8 insertions, 6 deletions
diff --git a/contrib/top/loadavg.h b/contrib/top/loadavg.h index f49541e..e3c156c 100644 --- a/contrib/top/loadavg.h +++ b/contrib/top/loadavg.h @@ -47,7 +47,7 @@ typedef double pctcpu; #endif #ifdef FIXED_LOADAVG - typedef long load_avg; + typedef fixpt_t load_avg; # define loaddouble(la) ((double)(la) / FIXED_LOADAVG) # define intload(i) ((int)((i) * FIXED_LOADAVG)) #else diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c index 2084b6c..f71ad55 100644 --- a/sys/alpha/alpha/machdep.c +++ b/sys/alpha/alpha/machdep.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: machdep.c,v 1.22 1998/11/15 18:25:15 dfr Exp $ + * $Id: machdep.c,v 1.23 1998/11/18 23:51:40 dfr Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -198,6 +198,8 @@ int ncpus; /* number of cpus */ vm_offset_t phys_avail[10]; +SYSCTL_INT(_hw, OID_AUTO, availpages, CTLFLAG_RD, &physmem, 0, ""); + /* must be 2 less so 0 0 can signal end of chunks */ #define PHYS_AVAIL_ARRAY_END ((sizeof(phys_avail) / sizeof(vm_offset_t)) - 2) diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index b0845e6..fad6d7c 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -19,7 +19,7 @@ * Steven Wallace <swallace@freebsd.org> * Wolfram Schneider <wosch@FreeBSD.org> * - * $Id: machine.c,v 1.14 1998/08/12 09:58:15 wosch Exp $ + * $Id: machine.c,v 1.15 1998/09/11 14:38:12 dt Exp $ */ @@ -628,8 +628,8 @@ char *(*get_userid)(); status, smpmode ? PP(pp, p_lastcpu) : 0, format_time(cputime), - 10000.0 * weighted_cpu(pct, pp) / hz, - 10000.0 * pct / hz, + 100.0 * weighted_cpu(pct, pp), + 100.0 * pct, cmdlength, printable(PP(pp, p_comm))); @@ -734,7 +734,7 @@ static unsigned char sorted_state[] = #define ORDERKEY_PCTCPU \ - if (lresult = PP(p2, p_pctcpu) - PP(p1, p_pctcpu), \ + if (lresult = (long) PP(p2, p_pctcpu) - (long) PP(p1, p_pctcpu), \ (result = lresult > 0 ? 1 : lresult < 0 ? -1 : 0) == 0) #define ORDERKEY_CPTICKS \ |