Commit | Line | Data |
---|---|---|
820547ce KT |
1 | /* |
2 | * One structure allocated per active | |
3 | * process. It contains all data needed | |
4 | * about the process while the | |
5 | * process may be swapped out. | |
6 | * Other per process data (user.h) | |
7 | * is swapped with the process. | |
8 | */ | |
9 | struct proc | |
10 | { | |
11 | char p_stat; | |
12 | char p_flag; | |
13 | char p_pri; /* priority, negative is high */ | |
14 | char p_sig; /* signal number sent to this process */ | |
15 | char p_uid; /* user id, used to direct tty signals */ | |
16 | char p_time; /* resident time for scheduling */ | |
17 | char p_cpu; /* cpu usage for scheduling */ | |
18 | char p_nice; /* nice for scheduling */ | |
19 | int p_ttyp; /* controlling tty */ | |
20 | int p_pid; /* unique process id */ | |
21 | int p_ppid; /* process id of parent */ | |
22 | int p_addr; /* address of swappable image */ | |
23 | int p_size; /* size of swappable image (*64 bytes) */ | |
24 | int p_wchan; /* event process is awaiting */ | |
25 | int *p_textp; /* pointer to text structure */ | |
26 | } proc[NPROC]; | |
27 | ||
28 | /* stat codes */ | |
29 | #define SSLEEP 1 /* sleeping on high priority */ | |
30 | #define SWAIT 2 /* sleeping on low priority */ | |
31 | #define SRUN 3 /* running */ | |
32 | #define SIDL 4 /* intermediate state in process creation */ | |
33 | #define SZOMB 5 /* intermediate state in process termination */ | |
34 | #define SSTOP 6 /* process being traced */ | |
35 | ||
36 | /* flag codes */ | |
37 | #define SLOAD 01 /* in core */ | |
38 | #define SSYS 02 /* scheduling process */ | |
39 | #define SLOCK 04 /* process cannot be swapped */ | |
40 | #define SSWAP 010 /* process is being swapped out */ | |
41 | #define STRC 020 /* process is being traced */ | |
42 | #define SWTED 040 /* another tracing flag */ |