summaryrefslogtreecommitdiff
path: root/getloadavg.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-09-17 00:16:57 +0000
committerRichard M. Stallman <rms@gnu.org>1994-09-17 00:16:57 +0000
commitc1e20276cbedef287a9923adaabf9ce17981bba9 (patch)
tree6a81b4ed46299101daf088e1c492368f909fac8f /getloadavg.c
parent9f71eaf6b508bf1f819c681232498168b05f3873 (diff)
downloadgunmake-c1e20276cbedef287a9923adaabf9ce17981bba9.tar.gz
(getloadavg): Add OSF_ALPHA support.
Diffstat (limited to 'getloadavg.c')
-rw-r--r--getloadavg.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/getloadavg.c b/getloadavg.c
index 0f730a7..e7804f0 100644
--- a/getloadavg.c
+++ b/getloadavg.c
@@ -149,6 +149,7 @@ extern int errno;
#if defined (__osf__) && (defined (__alpha) || defined (__alpha__))
#define OSF_ALPHA
+#include <sys/table.h>
#endif
#if defined (__osf__) && (defined (mips) || defined (__mips__))
@@ -702,6 +703,18 @@ getloadavg (loadavg, nelem)
: (load_ave.tl_avenrun.l[0] / (double) load_ave.tl_lscale));
#endif /* OSF_MIPS */
+#if !defined (LDAV_DONE) && defined (OSF_ALPHA)
+#define LDAV_DONE
+
+ struct tbl_loadavg load_ave;
+ table (TBL_LOADAVG, 0, &load_ave, 1, sizeof (load_ave));
+ for (elem = 0; elem < nelem; elem++)
+ loadavg[elem]
+ = (load_ave.tl_lscale == 0
+ ? load_ave.tl_avenrun.d[elem]
+ : (load_ave.tl_avenrun.l[elem] / (double) load_ave.tl_lscale));
+#endif /* OSF_ALPHA */
+
#if !defined (LDAV_DONE) && defined (VMS)
/* VMS specific code -- read from the Load Ave driver. */