* sysdeps/mach/getloadavg.c (getloadavg): Divide instead of multiply by LOAD_SCALE.

2000-09-11  Mark Kettenis  <kettenis@gnu.org>

	* sysdeps/mach/getloadavg.c (getloadavg): Divide instead of
	multiply by LOAD_SCALE.
This commit is contained in:
Mark Kettenis 2000-09-23 20:41:16 +00:00
parent cea9aac060
commit 96e26332f3
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2000-09-11 Mark Kettenis <kettenis@gnu.org>
* sysdeps/mach/getloadavg.c (getloadavg): Divide instead of
multiply by LOAD_SCALE.
2000-09-22 Jakub Jelinek <jakub@redhat.com> 2000-09-22 Jakub Jelinek <jakub@redhat.com>
* crypt/crypt.h (crypt, setkey, encrypt): Add __THROW. * crypt/crypt.h (crypt, setkey, encrypt): Add __THROW.

View File

@ -1,5 +1,5 @@
/* Get system load averages. Mach version. /* Get system load averages. Mach version.
Copyright (C) 1999 Free Software Foundation, Inc. Copyright (C) 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -48,7 +48,7 @@ getloadavg (double loadavg[], int nelem)
if (nelem > 3) if (nelem > 3)
nelem = 3; nelem = 3;
for (i = 0; i < nelem; ++i) for (i = 0; i < nelem; ++i)
loadavg[i] = (double) info.avenrun[i] * (double) LOAD_SCALE; loadavg[i] = (double) info.avenrun[i] / (double) LOAD_SCALE;
return i; return i;
} }