1: /*
2: * The user structure.
3: * One allocated per process.
4: * Contains all per process data
5: * that doesn't need to be referenced
6: * while the process is swapped.
7: * The user block is USIZE*64 bytes
8: * long; resides at virtual kernel
9: * loc 140000; contains the system
10: * stack per user; is cross referenced
11: * with the proc structure for the
12: * same process.
13: */
14: struct user
15: {
16: int u_rsav[2]; /* save r5,r6 when exchanging stacks */
17: int u_fsav[25]; /* save fp registers */
18: /* rsav and fsav must be first in structure */
19: char u_segflg; /* flag for IO; user or kernel space */
20: char u_error; /* return error code */
21: char u_uid; /* effective user id */
22: char u_gid; /* effective group id */
23: char u_ruid; /* real user id */
24: char u_rgid; /* real group id */
25: int u_procp; /* pointer to proc structure */
26: char *u_base; /* base address for IO */
27: char *u_count; /* bytes remaining for IO */
28: char *u_offset[2]; /* offset in file for IO */
29: int *u_cdir; /* pointer to inode of current directory */
30: char u_dbuf[DIRSIZ]; /* current pathname component */
31: char *u_dirp; /* current pointer to inode */
32: struct { /* current directory entry */
33: int u_ino;
34: char u_name[DIRSIZ];
35: } u_dent;
36: int *u_pdir; /* inode of parent directory of dirp */
37: int u_uisa[16]; /* prototype of segmentation addresses */
38: int u_uisd[16]; /* prototype of segmentation descriptors */
39: int u_ofile[NOFILE]; /* pointers to file structures of open files */
40: int u_arg[5]; /* arguments to current system call */
41: int u_tsize; /* text size (*64) */
42: int u_dsize; /* data size (*64) */
43: int u_ssize; /* stack size (*64) */
44: int u_sep; /* flag for I and D separation */
45: int u_qsav[2]; /* label variable for quits and interrupts */
46: int u_ssav[2]; /* label variable for swapping */
47: int u_signal[NSIG]; /* disposition of signals */
48: int u_utime; /* this process user time */
49: int u_stime; /* this process system time */
50: int u_cutime[2]; /* sum of childs' utimes */
51: int u_cstime[2]; /* sum of childs' stimes */
52: int *u_ar0; /* address of users saved R0 */
53: int u_prof[4]; /* profile arguments */
54: char u_intflg; /* catch intr from sys */
55: /* kernel stack per user
56: * extends from u + USIZE*64
57: * backward not to reach here
58: */
59: } u;
60:
61: /* u_error codes */
62: #define EFAULT 106
63: #define EPERM 1
64: #define ENOENT 2
65: #define ESRCH 3
66: #define EINTR 4
67: #define EIO 5
68: #define ENXIO 6
69: #define E2BIG 7
70: #define ENOEXEC 8
71: #define EBADF 9
72: #define ECHILD 10
73: #define EAGAIN 11
74: #define ENOMEM 12
75: #define EACCES 13
76: #define ENOTBLK 15
77: #define EBUSY 16
78: #define EEXIST 17
79: #define EXDEV 18
80: #define ENODEV 19
81: #define ENOTDIR 20
82: #define EISDIR 21
83: #define EINVAL 22
84: #define ENFILE 23
85: #define EMFILE 24
86: #define ENOTTY 25
87: #define ETXTBSY 26
88: #define EFBIG 27
89: #define ENOSPC 28
90: #define ESPIPE 29
91: #define EROFS 30
92: #define EMLINK 31
93: #define EPIPE 32
Defined variables
u
defined in line
59; used 575 times
- in /usr/sys/dmr/bio.c line
561-568(5),
583-584(3),
598-618(7),
634-635(2)
- in /usr/sys/dmr/cat.c line
34
- in /usr/sys/dmr/dc.c line
109,
129-130(2)
- in /usr/sys/dmr/dh.c line
77,
95-96(2)
- in /usr/sys/dmr/dn.c line
43,
68,
74
- in /usr/sys/dmr/dp.c line
72-76(3),
127,
139-147(5),
160
- in /usr/sys/dmr/hp.c line
210-213(3)
- in /usr/sys/dmr/ht.c line
70,
230,
237,
245
- in /usr/sys/dmr/kl.c line
38-43(3)
- in /usr/sys/dmr/lp.c line
50
- in /usr/sys/dmr/mem.c line
25-26(2),
38,
47-56(7)
- in /usr/sys/dmr/pc.c line
57,
147
- in /usr/sys/dmr/rp.c line
167-170(3)
- in /usr/sys/dmr/sys.c line
50-52(2)
- in /usr/sys/dmr/tm.c line
57,
203,
210,
218
- in /usr/sys/dmr/tty.c line
82-84(2),
98-101(4),
119-123(2),
531
- in /usr/sys/dmr/vt.c line
28
- in /usr/sys/ken/alloc.c line
30,
88,
213
- in /usr/sys/ken/clock.c line
90-95(5),
126-129(2)
- in /usr/sys/ken/fio.c line
27-31(2),
125,
152-160(3),
166-168(2),
175,
194,
209-211(2),
223-227(3),
249,
256
- in /usr/sys/ken/iget.c line
61,
203,
209-210(2),
225-233(10)
- in /usr/sys/ken/main.c line
100,
112-113(2),
144-145(2),
153-155(2),
192-193(2),
205,
221-226(2),
242-248(6),
255
- in /usr/sys/ken/nami.c line
32,
39,
49,
61,
72-82(5),
89-93(4),
104,
110-116(3),
126-130(2),
141-150(10),
168,
185,
196-198(2)
- in /usr/sys/ken/pipe.c line
41-50(5),
111-114(3),
127,
138,
150-151(2),
173-176(5)
- in /usr/sys/ken/rdwri.c line
31,
40-45(5),
63(2),
90-96(4),
107-119(8),
171-182(8)
- in /usr/sys/ken/sig.c line
93,
100,
117,
143-156(10),
170-174(3),
193-197(3),
205-221(13),
234-243(10),
249,
260-269(5),
276-285(5),
300,
326,
345-353(5),
362
- in /usr/sys/ken/slp.c line
30,
65,
275,
329,
384,
401(2),
408,
414-416(2),
430,
442,
467,
475-478(2)
- in /usr/sys/ken/subr.c line
29,
136-146(9),
160-171(9),
182
- in /usr/sys/ken/sys1.c line
56-60(2),
68,
90-111(17),
121-122(3),
132,
139,
146-148(5),
155-162(9),
177-184(5),
192-198(6),
217(2),
233-241(6),
247-249(2),
288-291(2),
301-307(7),
314-315(2),
323-326(2),
336-357(11),
375-389(13),
399-400(2)
- in /usr/sys/ken/sys2.c line
35-44(7),
50-57(7),
71-72(2),
85-87(2),
115-118(2),
127-131(3),
145-148(3),
160-174(6),
211,
220-230(7),
252-261(4),
278
- in /usr/sys/ken/sys3.c line
22-25(2),
39,
74-79(2),
94-96(3),
113-117(3),
128,
135,
151-156(2),
162,
188-191(2)
- in /usr/sys/ken/sys4.c line
19,
25-26(2),
33-34(2),
43-47(5),
54-55(4),
62-65(4),
72-78(6),
91-96(2),
112-120(6),
139,
146-147(2),
158-160(3),
171-172(2),
206-214(8),
224-225(2),
233-239(4),
246-248(4),
255-258(8)
- in /usr/sys/ken/text.c line
57-58(2),
94,
104,
112,
118-122(5),
134-137(4)
- in /usr/sys/ken/trap.c line
50,
83,
101,
112-126(9),
142,
161,
167-172(2),
193-196(3),
204
Defined struct's
user
defined in line
14; used 2 times
Defined macros
E2BIG
defined in line
69; used 1 times
EBADF
defined in line
71; used 2 times
EBUSY
defined in line
77; used 2 times
EFBIG
defined in line
88; used 1 times
EINTR
defined in line
66; used 1 times
EIO
defined in line
67; used 6 times
ENXIO
defined in line
68; used 15 times
EPERM
defined in line
63; used 1 times
EPIPE
defined in line
93; used 1 times
EROFS
defined in line
91; used 1 times
ESRCH
defined in line
65; used 2 times
EXDEV
defined in line
79; used 1 times
Usage of this include