From 83746b56b235a0bc4d30dcfd470f6d536333a502 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 20 Nov 2010 19:33:28 -0800 Subject: Remove ancient Domain/OS support (unifdef -Uapollo) Signed-off-by: Alan Coopersmith --- get_load.c | 63 -------------------------------------------------------------- 1 file changed, 63 deletions(-) (limited to 'get_load.c') diff --git a/get_load.c b/get_load.c index 8a87d42..7ea6a30 100644 --- a/get_load.c +++ b/get_load.c @@ -112,13 +112,11 @@ void GetLoadPoint( #define LOADSTUB #endif -#ifndef apollo #ifndef LOADSTUB #if !defined(linux) && !defined(__UNIXOS2__) && !defined(__GLIBC__) #include #endif /* !linux && ... */ #endif /* LOADSTUB */ -#endif /* apollo */ #if defined(MOTOROLA) && defined(SYSV) #include @@ -209,66 +207,6 @@ extern long lseek(); void xload_error(char *, char *); -#ifdef apollo -#include -#include -typedef struct { - short state; /* ready, waiting, etc. */ - pinteger usr; /* user sr */ - linteger upc; /* user pc */ - linteger usp; /* user stack pointer */ - linteger usb; /* user sb ptr (A6) */ - time_$clock_t cpu_total; /* cumulative cpu used by process */ - unsigned short priority; /* process priority */ - } proc1_$info_t; - -void proc1_$get_cput( - time_$clock_t *cput -); - -void proc1_$get_info( - short &pid, - proc1_$info_t *info, - status_$t *sts -); - -static int lastNullCpu; -static int lastClock; - -void InitLoadPoint() /* Apollo version */ -{ - time_$clock_t timeNow; - proc1_$info_t info; - status_$t st; - - proc1_$get_info( (short) 2, &info, &st ); - time_$clock( &timeNow ); - - lastClock = timeNow.low32; - lastNullCpu = info.cpu_total.low32; -} - -/* ARGSUSED */ -void GetLoadPoint( w, closure, call_data ) /* Apollo version */ - Widget w; /* unused */ - XtPointer closure; /* unused */ - XtPointer call_data; /* pointer to (double) return value */ -{ - time_$clock_t timeNow; - double temp; - proc1_$info_t info; - status_$t st; - - proc1_$get_info( (short) 2, &info, &st ); - time_$clock( &timeNow ); - - temp = info.cpu_total.low32 - lastNullCpu; - *(double *)call_data = 1.0 - temp / (timeNow.low32 - lastClock); - - lastClock = timeNow.low32; - lastNullCpu = info.cpu_total.low32; -} -#else /* not apollo */ #if defined(SYSV) && defined(i386) /* * inspired by 'avgload' by John F. Haugh II @@ -1089,7 +1027,6 @@ void xload_error(char *str1, char *str2) exit(-1); } -#endif /* apollo else */ #else /* !DGUX */ -- cgit v1.2.3