machine.h revision 24142
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};
36
37/* cpu_states is an array of percentages * 10.  For example,
38   the (integer) value 105 is 10.5% (or .105).
39 */
40
41/*
42 * the process_select struct tells get_process_info what processes we
43 * are interested in seeing
44 */
45
46struct process_select
47{
48    int idle;		/* show idle processes */
49    int system;		/* show system processes */
50    int uid;		/* only this uid (unless uid == -1) */
51    char *command;	/* only this command (unless == NULL) */
52};
53
54/* routines defined by the machine dependent module */
55
56char *format_header();
57char *format_next_process();
58
59/* non-int routines typically used by the machine dependent module */
60char *printable();
61