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 */
Defined variables
proc
defined in line
26; used 59 times
- in /usr/source/s2/ps.c line
110(2),
118-120(2),
126-134(3),
141,
149-160(9),
240-247(4)
- in /usr/sys/ken/clock.c line
111(2)
- in /usr/sys/ken/main.c line
96-100(5)
- in /usr/sys/ken/sig.c line
52(2),
119(2),
264(2)
- in /usr/sys/ken/slp.c line
77,
164(2),
195(2),
210(2),
271,
279,
292-293(2),
371(2)
- in /usr/sys/ken/sys1.c line
255-259(5),
287(2),
337(2)
- in /usr/sys/ken/sys4.c line
226-231(3)
Defined struct's
proc
defined in line
9; used 38 times
- in /usr/source/s2/ps.c line
19(2),
56(2)
- in /usr/sys/ken/clock.c line
29(2)
- in /usr/sys/ken/sig.c line
50(2),
91(2),
114(2),
258(2)
- in /usr/sys/ken/slp.c line
73(2),
93(2),
146-147(4),
266-268(4),
354-355(4)
- in /usr/sys/ken/sys1.c line
231(2),
282(2),
334(2)
- in /usr/sys/ken/sys4.c line
219(2)
Defined macros
SIDL
defined in line
32; used 1 times
SLOAD
defined in line
37; used 13 times
SLOCK
defined in line
39; used 8 times
SRUN
defined in line
31; used 7 times
SSTOP
defined in line
34; used 5 times
SSWAP
defined in line
40; used 5 times
SSYS
defined in line
38; used 3 times
STRC
defined in line
41; used 6 times
SWAIT
defined in line
30; used 3 times
SWTED
defined in line
42; used 4 times
SZOMB
defined in line
33; used 2 times
Usage of this include