machine.h revision 42447
1/*
2 *  This file defines the interface between top and the machine-dependent
3 *  module.  It is NOT machine dependent and should not need to be changed
4 *  for any specific machine.
5 */
6
7/*
8 * the statics struct is filled in by machine_init
9 */
10struct statics
11{
12    char **procstate_names;
13    char **cpustate_names;
14    char **memory_names;
15    char **swap_names;
16#ifdef ORDER
17    char **order_names;
18#endif
19};
20
21/*
22 * the system_info struct is filled in by a machine dependent routine.
23 */
24
25struct system_info
26{
27    int    last_pid;
28    double load_avg[NUM_AVERAGES];
29    int    p_total;
30    int    p_active;     /* number of procs considered "active" */
31    int    *procstates;
32    int    *cpustates;
33    int    *memory;
34    int    *swap;
35    struct timeval boottime;
36};
37
38/* cpu_states is an array of percentages * 10.  For example,
39   the (integer) value 105 is 10.5% (or .105).
40 */
41
42/*
43 * the process_select struct tells get_process_info what processes we
44 * are interested in seeing
45 */
46
47struct process_select
48{
49    int idle;		/* show idle processes */
50    int self;		/* show self */
51    int system;		/* show system processes */
52    int uid;		/* only this uid (unless uid == -1) */
53    char *command;	/* only this command (unless == NULL) */
54};
55
56/* routines defined by the machine dependent module */
57
58char *format_header();
59char *format_next_process();
60
61/* non-int routines typically used by the machine dependent module */
62char *printable();
63