6 * This file defines the interface between top and the machine-dependent
7 * module. It is NOT machine dependent and should not need to be changed
8 * for any specific machine.
16 * the statics struct is filled in by machine_init
20 char **procstate_names;
21 char **cpustate_names;
33 * the system_info struct is filled in by a machine dependent routine.
36 #ifdef p_active /* uw7 define macro p_active */
37 #define P_ACTIVE p_pactive
39 #define P_ACTIVE p_active
45 double load_avg[NUM_AVERAGES];
47 int P_ACTIVE; /* number of procs considered "active" */
54 struct timeval boottime;
58 /* cpu_states is an array of percentages * 10. For example,
59 the (integer) value 105 is 10.5% (or .105).
63 * the process_select struct tells get_process_info what processes we
64 * are interested in seeing
69 int idle; /* show idle processes */
70 int self; /* show self */
71 int system; /* show system processes */
72 int thread; /* show threads */
73 int uid; /* only this uid (unless uid == -1) */
74 int wcpu; /* show weighted cpu */
75 int jid; /* only this jid (unless jid == -1) */
76 int jail; /* show jail ID */
77 int swap; /* show swap usage */
78 int kidle; /* show per-CPU idle threads */
79 char *command; /* only this command (unless == NULL) */
82 /* routines defined by the machine dependent module */
84 char *format_header(char *uname_field);
85 char *format_next_process(caddr_t handle, char *(*get_userid)(int),
87 void toggle_pcpustats(void);
88 void get_system_info(struct system_info *si);
89 int machine_init(struct statics *statics, char do_unames);
90 int proc_owner(int pid);
92 /* non-int routines typically used by the machine dependent module */
93 char *printable(char *string);
95 #endif /* MACHINE_H */