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: char p_stat;
11: char p_flag;
12: char p_pri; /* priority, negative is high */
13: char p_time; /* resident time for scheduling */
14: char p_cpu; /* cpu usage for scheduling */
15: char p_nice; /* nice for cpu usage */
16: short p_sig; /* signals pending to this process */
17: short p_uid; /* user id, used to direct tty signals */
18: short p_pgrp; /* name of process group leader */
19: short p_pid; /* unique process id */
20: short p_ppid; /* process id of parent */
21: short p_addr; /* address of swappable image */
22: short p_size; /* size of swappable image (clicks) */
23: caddr_t p_wchan; /* event process is awaiting */
24: struct text *p_textp; /* pointer to text structure */
25: struct proc *p_link; /* linked list of running processes */
26: int p_clktim; /* time to alarm clock signal */
27: };
28:
29: extern struct proc proc[]; /* the proc table itself */
30:
31: /* stat codes */
32: #define SSLEEP 1 /* awaiting an event */
33: #define SWAIT 2 /* (abandoned state) */
34: #define SRUN 3 /* running */
35: #define SIDL 4 /* intermediate state in process creation */
36: #define SZOMB 5 /* intermediate state in process termination */
37: #define SSTOP 6 /* process being traced */
38:
39: /* flag codes */
40: #define SLOAD 01 /* in core */
41: #define SSYS 02 /* scheduling process */
42: #define SLOCK 04 /* process cannot be swapped */
43: #define SSWAP 010 /* process is being swapped out */
44: #define STRC 020 /* process is being traced */
45: #define SWTED 040 /* another tracing flag */
46: #define SULOCK 0100 /* user settable lock in core */
47:
48: /*
49: * parallel proc structure
50: * to replace part with times
51: * to be passed to parent process
52: * in ZOMBIE state.
53: */
54: struct xproc {
55: char xp_stat;
56: char xp_flag;
57: char xp_pri; /* priority, negative is high */
58: char xp_time; /* resident time for scheduling */
59: char xp_cpu; /* cpu usage for scheduling */
60: char xp_nice; /* nice for cpu usage */
61: short xp_sig; /* signals pending to this process */
62: short xp_uid; /* user id, used to direct tty signals */
63: short xp_pgrp; /* name of process group leader */
64: short xp_pid; /* unique process id */
65: short xp_ppid; /* process id of parent */
66: short xp_xstat; /* Exit status for wait */
67: time_t xp_utime; /* user time, this proc */
68: time_t xp_stime; /* system time, this proc */
69: };
Defined struct's
proc
defined in line
9; used 78 times
- in line 25-29(4)
- in /usr/src/cmd/ps.c line
22(2)
- in /usr/src/cmd/pstat.c line
199-200(4)
- in /usr/sys/conf/c.c line
82(2)
- in /usr/sys/dev/mx1.c line
387(2)
- in /usr/sys/dev/pk1.c line
149(2)
- in /usr/sys/dev/tty.c line
65(2)
- in /usr/sys/sys/acct.c line
115(2)
- in /usr/sys/sys/clock.c line
33(2)
- in /usr/sys/sys/sig.c line
42(2),
56(2),
84(2),
104(2),
131(2),
173(2),
241(2),
269(2)
- in /usr/sys/sys/slp.c line
14(2),
30(2),
85(2),
95(2),
119-121(4),
141(2),
172(2),
204(2),
293(2),
350(2),
429-430(4),
548(2)
- in /usr/sys/sys/sys1.c line
328(2),
380(2),
424(2)
- in /usr/sys/sys/sys4.c line
294(2),
359(2)
- in /usr/sys/sys/text.c line
23(2)
xproc
defined in line
54; used 12 times
Defined macros
SIDL
defined in line
35; used 1 times
SLOAD
defined in line
40; used 11 times
SLOCK
defined in line
42; used 7 times
SRUN
defined in line
34; used 8 times
SSTOP
defined in line
37; used 5 times
SSWAP
defined in line
43; used 5 times
SSYS
defined in line
41; used 2 times
STRC
defined in line
44; used 6 times
SWAIT
defined in line
33;
never used
SWTED
defined in line
45; used 3 times
SZOMB
defined in line
36; used 7 times
Usage of this include