1: #ifdef KERNEL
2: /*
3: * Random set of variables
4: * used by more than one
5: * routine.
6: */
7: struct inode *rootdir; /* pointer to inode of root directory */
8: struct proc *runq; /* head of linked list of running processes */
9: struct proc *maxproc; /* current high water mark in proc table */
10: extern cputype; /* type of cpu = 40, 44, 45, 60, or 70 */
11: int lbolt; /* clock ticks since time was last updated */
12: time_t time; /* time in sec from 1970 */
13: ubadr_t clstaddr; /* UNIBUS virtual address of clists */
14:
15: /*
16: * Nblkdev is the number of entries
17: * (rows) in the block switch.
18: * Used in bounds checking on major
19: * device numbers.
20: */
21: int nblkdev;
22:
23: int nchrdev; /* Number of character switch entries. */
24: int mpid; /* generic for unique process id's */
25: bool_t runin; /* set when sched wants to swap someone in */
26: bool_t runout; /* set when sched is out of work */
27: bool_t runrun; /* reschedule at next opportunity */
28: char curpri; /* p_pri of current process */
29: size_t maxmem; /* actual max memory per process */
30: u_short *lks; /* pointer to clock device */
31: extern daddr_t swplo; /* block number of swap space */
32: extern int nswap; /* size of swap space */
33: int updlock; /* lock for sync */
34: daddr_t rablock; /* block to be read ahead */
35: extern char regloc[]; /* offsets of saved user registers (trap.c) */
36: extern char msgbuf[]; /* saved "printf" characters */
37: extern dev_t rootdev; /* device of the root */
38: extern dev_t swapdev; /* swapping device */
39: extern dev_t pipedev; /* pipe device */
40: extern int hz; /* Ticks/second of the clock */
41: extern int timezone; /* Minutes westward from Greenwich */
42: extern bool_t dstflag; /* Daylight Saving Time applies here */
43: extern int nmount; /* number of mountable file systems */
44: extern int nfile; /* number of in core file structures */
45: extern int ninode; /* number of in core inodes */
46: extern int nproc; /* maximum number of processes */
47: extern int ntext; /* maximum number of shared text segments */
48: extern int nbuf; /* number of buffers in buffer cache */
49: extern int bsize; /* size of buffers */
50: extern int nclist; /* number of character lists */
51:
52: /*
53: * Pointers to ends of variable-sized tables
54: * (point to first unused entry, e.g. proc[NPROC])
55: */
56: extern struct mount *mountNMOUNT;
57: extern struct file *fileNFILE;
58: extern struct inode *inodeNINODE;
59: extern struct proc *procNPROC;
60: extern struct text *textNTEXT;
61:
62: #ifdef UCB_AUTOBOOT
63: extern dev_t dumpdev; /* device for automatic dump on panic */
64: extern daddr_t dumplo; /* starting block on dumpdev */
65: #endif
66:
67: extern int icode[]; /* user init code */
68: extern int szicode; /* its size */
69:
70: #ifdef CGL_RTP
71: struct proc *rtpp; /* pointer to real time process entry */
72: int wantrtp; /* real-time proc is ready to run */
73: #endif
74: time_t bootime;
75:
76: #ifdef UCB_AUTOBOOT
77: int bootflags;
78: #endif
79:
80: extern bool_t sep_id; /* Do we have separate I/D? */
81:
82: dev_t getmdev();
83: daddr_t bmap();
84: memaddr malloc();
85: struct inode *ialloc();
86: struct inode *iget();
87: struct inode *owner();
88: struct inode *maknode();
89: struct inode *namei();
90: struct buf *alloc();
91: struct buf *getblk();
92: struct buf *geteblk();
93: struct buf *bread();
94: struct buf *breada();
95: struct filsys *getfs();
96: struct file *getf();
97: struct file *falloc();
98: int uchar();
99:
100: caddr_t mapin();
101:
102: #ifdef NOKA5
103: #define mapout(bp) /* unused */
104: #endif
105:
106: /*
107: * Instrumentation
108: */
109:
110: int dk_busy;
111: /*
112: * sy_time contains counters for time in user (0,1), nice (2,3),
113: * system (4,5) and idle (6,7) with no I/O active (even)
114: * or some disc active (odd).
115: */
116: long sy_time[8];
117: extern int ndisk; /* number of disks monitored */
118: extern long dk_time[];
119: extern long dk_numb[];
120: extern long dk_wds[];
121:
122: long tk_nin;
123: long tk_nout;
124:
125: #endif KERNEL
126:
127: #ifdef DISKMON
128: struct ioinfo {
129: long nread;
130: long nreada;
131: long ncache;
132: long nwrite;
133: };
134: #endif
135:
136: /*
137: * Structure of the system-entry table
138: */
139: struct sysent { /* system call entry table */
140: char sy_narg; /* total number of arguments */
141: char sy_nrarg; /* number of args in registers */
142: int (*sy_call)(); /* handler */
143: };
144:
145: #ifdef KERNEL
146: extern struct sysent sysent[]; /* local system call entry table */
147: extern struct sysent syslocal[]; /* local system call entry table */
148: extern int nlocalsys; /* number of local syscalls in table */
149: #endif KERNEL
150:
151: #define SYSINDIR 0 /* ordinal of indirect sys call */
152: #define SYSLOCAL 58 /* ordinal of local indirect call */
153:
154: /*
155: * Structure of the disk driver partition tables
156: */
157: struct size {
158: daddr_t nblocks;
159: short cyloff;
160: };
161:
162: /* operations performed by namei */
163: #define LOOKUP 0 /* perform name lookup only */
164: #define CREATE 1 /* setup for file creation */
165: #define DELETE 2 /* setup for file deletion */
Defined variables
dk_busy
defined in line
110; used 46 times
- in /usr/src/sys/dev/Others/ml.c line
167,
187
- in /usr/src/sys/dev/dvhp.c line
140,
183,
279,
299
- in /usr/src/sys/dev/hk.c line
177,
230,
316,
337
- in /usr/src/sys/dev/hp.badsect.c line
155,
236,
337,
357
- in /usr/src/sys/dev/hp.c line
140,
196,
290,
310
- in /usr/src/sys/dev/hs.c line
113,
128
- in /usr/src/sys/dev/rf.c line
81,
95
- in /usr/src/sys/dev/rk.c line
92,
106
- in /usr/src/sys/dev/rl.c line
171,
242
- in /usr/src/sys/dev/rm.badsect.c line
160,
235,
378,
397
- in /usr/src/sys/dev/rm.c line
149,
199,
310,
329
- in /usr/src/sys/dev/rp.c line
111,
126
- in /usr/src/sys/dev/xp.badsect.c line
302,
386,
494,
519
- in /usr/src/sys/dev/xp.c line
279,
339,
441,
466
- in /usr/src/sys/sys/clock.c line
147,
161
lbolt
defined in line
11; used 15 times
maxproc
defined in line
9; used 27 times
- in /usr/src/sys/sys/clock.c line
186,
347
- in /usr/src/sys/sys/sigjcl.c line
60,
664
- in /usr/src/sys/sys/signojcl.c line
54,
117,
373
- in /usr/src/sys/sys/slp.c line
390,
437,
800-801(2)
- in /usr/src/sys/sys/sys1.c line
685,
715,
722,
751,
778-780(3)
- in /usr/src/sys/sys/sys4.c line
411,
438,
471,
640,
678,
685
- in /usr/src/sys/sys/syslocal.c line
259,
302,
439
mpid
defined in line
24; used 6 times
rtpp
defined in line
71; used 9 times
runq
defined in line
8; used 9 times
Defined struct's
size
defined in line
157; used 44 times
- in /usr/src/sys/GENERIC/ioconf.c line
35(2),
51(2),
81(2),
95(2),
111(2),
123(2)
- in /usr/src/sys/conf/ioconf.c line
35(2),
51(2),
81(2),
95(2),
111(2),
123(2),
135(2)
- in /usr/src/sys/dev/dvhp.c line
28(2)
- in /usr/src/sys/dev/hk.c line
35(2)
- in /usr/src/sys/dev/hp.badsect.c line
38(2)
- in /usr/src/sys/dev/hp.c line
28(2)
- in /usr/src/sys/dev/rm.badsect.c line
36(2)
- in /usr/src/sys/dev/rm.c line
31(2)
- in /usr/src/sys/dev/rp.c line
19(2)
- in /usr/src/sys/dev/xp.badsect.c line
145(2)
- in /usr/src/sys/dev/xp.c line
130(2)
Defined macros
mapout
defined in line
103; used 31 times
- in /usr/src/sys/dev/bio.c line
467
- in /usr/src/sys/sys/alloc.c line
103,
119,
198,
324,
452
- in /usr/src/sys/sys/iget.c line
196,
364,
482
- in /usr/src/sys/sys/main.c line
136
- in /usr/src/sys/sys/nami.c line
150,
175,
217,
276,
343,
489
- in /usr/src/sys/sys/rdwri.c line
81,
173-177(2),
183,
194
- in /usr/src/sys/sys/subr.c line
133,
153
- in /usr/src/sys/sys/sys1.c line
158,
174,
208,
233,
242
- in /usr/src/sys/sys/sys3.c line
126,
229
- in /usr/src/sys/sys/syslocal.c line
199
Usage of this include