changeset 8816:fbc29f1ddd08

(getloadavg): Add OSF_ALPHA support.
author Richard M. Stallman <rms@gnu.org>
date Sat, 17 Sep 1994 00:16:57 +0000
parents b1766995a504
children 48ff00bebef6
files src/getloadavg.c
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/getloadavg.c	Sat Sep 17 00:14:40 1994 +0000
+++ b/src/getloadavg.c	Sat Sep 17 00:16:57 1994 +0000
@@ -149,6 +149,7 @@
 
 #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 @@
        : (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.  */