# define LOAD_AVE_TYPE long
# endif
-# ifdef sgi
-# define LOAD_AVE_TYPE long
-# endif
-
# ifdef SVR4
# define LOAD_AVE_TYPE long
# endif
# endif
# endif /* NeXT */
-# ifdef sgi
-# include <sys/sysmp.h>
-# endif /* sgi */
-
# ifdef UMAX
# include <signal.h>
# include <sys/time.h>
/* Offset in kmem to seek to read load average, or 0 means invalid. */
static long offset;
-# if ! defined __VMS && ! defined sgi && ! (defined __linux__ || defined __ANDROID__)
+# if ! defined __VMS && ! (defined __linux__ || defined __ANDROID__)
static struct nlist name_list[2];
# endif
# endif /* ! defined LDAV_DONE && defined __VMS */
# if ! defined LDAV_DONE && defined LOAD_AVE_TYPE && ! defined __VMS
- /* IRIX, other old systems */
+ /* other old systems */
/* UNIX-specific code -- read the average from /dev/kmem. */
/* Get the address of LDAV_SYMBOL. */
if (offset == 0)
{
-# ifndef sgi
-# if ! defined NLIST_STRUCT || ! defined N_NAME_POINTER
+# if ! defined NLIST_STRUCT || ! defined N_NAME_POINTER
strcpy (name_list[0].n_name, LDAV_SYMBOL);
strcpy (name_list[1].n_name, "");
-# else /* NLIST_STRUCT */
-# ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
+# else /* NLIST_STRUCT */
+# ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
name_list[0].n_un.n_name = LDAV_SYMBOL;
name_list[1].n_un.n_name = 0;
-# else /* not HAVE_STRUCT_NLIST_N_UN_N_NAME */
+# else /* not HAVE_STRUCT_NLIST_N_UN_N_NAME */
name_list[0].n_name = LDAV_SYMBOL;
name_list[1].n_name = 0;
-# endif /* not HAVE_STRUCT_NLIST_N_UN_N_NAME */
-# endif /* NLIST_STRUCT */
+# endif /* not HAVE_STRUCT_NLIST_N_UN_N_NAME */
+# endif /* NLIST_STRUCT */
-# ifndef SUNOS_5
+# ifndef SUNOS_5
if (
-# if !defined (_AIX)
+# if !defined (_AIX)
nlist (KERNEL_FILE, name_list)
-# else /* _AIX */
+# else /* _AIX */
knlist (name_list, 1, sizeof (name_list[0]))
-# endif
+# endif
>= 0)
/* Omit "&& name_list[0].n_type != 0 " -- it breaks on Sun386i. */
{
-# ifdef FIXUP_KERNEL_SYMBOL_ADDR
+# ifdef FIXUP_KERNEL_SYMBOL_ADDR
FIXUP_KERNEL_SYMBOL_ADDR (name_list);
-# endif
+# endif
offset = name_list[0].n_value;
}
-# endif /* !SUNOS_5 */
-# else /* sgi */
- ptrdiff_t ldav_off = sysmp (MP_KERNADDR, MPKA_AVENRUN);
- if (ldav_off != -1)
- offset = (long int) ldav_off & 0x7fffffff;
-# endif /* sgi */
+# endif /* !SUNOS_5 */
}
/* Make sure we have /dev/kmem open. */