diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-12-20 18:35:17 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-12-20 18:35:17 -0800 |
commit | 1918be9695e0e912cb536373dd3da385473ab9e5 (patch) | |
tree | a52cbf45a3ad467ae75846a972c9b9baee7b6e73 | |
parent | f2b4a35060e6ebe55846b62780ca01c6d519c84f (diff) |
Remove DG/UX support
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | get_load.c | 88 | ||||
-rw-r--r-- | man/xload.man | 1 |
2 files changed, 0 insertions, 89 deletions
@@ -104,7 +104,6 @@ void GetLoadPoint( #else -#if !defined(DGUX) #if defined(att) || defined(QNX4) #define LOADSTUB #endif @@ -1024,91 +1023,4 @@ static void xload_error(const char *str1, const char *str2) exit(-1); } - -#else /* !DGUX */ - -/* INTEL DGUX Release 4.20MU04 - * Copyright 1999 Takis Psarogiannakopoulos - * Cambridge, UK - * <takis@dpmms.cam.ac.uk> - */ - -#include <errno.h> -#include <nlist.h> -#include <sys/dg_sys_info.h> - -static struct dg_sys_info_load_info load_info; /* DG/ux */ - -#define KERNEL_FILE "/dgux" -#define LDAV_SYMBOL "_avenrun" - -void InitLoadPoint() -{ - -} - -void GetLoadPoint(w, closure, call_data) - Widget w; /* unused */ - XtPointer closure; /* unused */ - XtPointer call_data; /* ptr to (double) return value */ -{ - double *loadavg = (double *)call_data; - - if (getloadavg(loadavg, 1) < 0) - xload_error("couldn't obtain load average", ""); -} - -xload_error(str1, str2) -char *str1, *str2; -{ - (void) fprintf(stderr,"xload: %s %s\n", str1, str2); - exit(-1); -} - -#if !defined (LDAV_CVT) && defined (FSCALE) -#define LDAV_CVT(n) (((double) (n)) / FSCALE) -#endif -#if !defined(LDAV_CVT) && defined(LOAD_AVE_CVT) -#define LDAV_CVT(n) (LOAD_AVE_CVT (n) / 100.0) -#endif -#define LOAD_AVE_TYPE double -#ifndef LDAV_CVT -#define LDAV_CVT(n) ((double) (n)) -#endif /* !LDAV_CVT */ -static int channel; -static int getloadavg_initialized; -static long offset; -static struct nlist nl[2]; - - -/* GETLOADAVG FUNCTION FOR DG/ux R4.20MU04 */ - -int -getloadavg (double loadavg[], int nelem) -{ - int elem = 0; /* Return value. */ - int result =0 ; - - /* This call can return -1 for an error, but with good args - it's not supposed to fail. The first argument is for no - apparent reason of type `long int *'. */ - result = dg_sys_info ((long int *) &load_info, - DG_SYS_INFO_LOAD_INFO_TYPE, DG_SYS_INFO_LOAD_VERSION_0); - if ( result == -1) - { - return(-1); - } - if (nelem > 0) - loadavg[elem++] = load_info.one_minute; - if (nelem > 1) - loadavg[elem++] = load_info.five_minute; - if (nelem > 2) - loadavg[elem++] = load_info.fifteen_minute; - - return elem; -} - -#endif /* END OF DG/ux */ - - #endif /* END of __CYGWIN__ */ diff --git a/man/xload.man b/man/xload.man index d938af3..ea664a3 100644 --- a/man/xload.man +++ b/man/xload.man @@ -107,4 +107,3 @@ K. Shane Hartman (MIT-LCS) and Stuart A. Malone (MIT-LCS); .br with features added by Jim Gettys (MIT-Athena), Bob Scheifler (MIT-LCS), Tony Della Fera (MIT-Athena), and Chris Peterson (MIT-LCS). -DG/UX support by Takis Psarogiannakopoulos (XFree86 Project). |