Commit | Line | Data |
---|---|---|
b1078c35 | 1 | /* |
0880b18e | 2 | * Copyright (c) 1980, 1986 Regents of the University of California. |
b1078c35 KM |
3 | * All rights reserved. The Berkeley software License Agreement |
4 | * specifies the terms and conditions for redistribution. | |
86cbc46c | 5 | * |
46a9a1d7 | 6 | * @(#)param.c 7.2 (Berkeley) %G% |
b1078c35 KM |
7 | */ |
8 | ||
9 | #ifndef lint | |
10 | char copyright[] = | |
0880b18e | 11 | "@(#) Copyright (c) 1980, 1986 Regents of the University of California.\n\ |
b1078c35 KM |
12 | All rights reserved.\n"; |
13 | #endif not lint | |
ec6f91b0 BJ |
14 | |
15 | #include "../h/param.h" | |
16 | #include "../h/systm.h" | |
751b301e | 17 | #include "../h/socket.h" |
ec6f91b0 BJ |
18 | #include "../h/dir.h" |
19 | #include "../h/user.h" | |
20 | #include "../h/proc.h" | |
21 | #include "../h/text.h" | |
22 | #include "../h/inode.h" | |
23 | #include "../h/file.h" | |
24 | #include "../h/callout.h" | |
25 | #include "../h/clist.h" | |
26 | #include "../h/cmap.h" | |
01966f05 | 27 | #include "../h/mbuf.h" |
ab12a1f4 | 28 | #include "../h/quota.h" |
bf75e5ce | 29 | #include "../h/kernel.h" |
ec6f91b0 BJ |
30 | /* |
31 | * System parameter formulae. | |
32 | * | |
33 | * This file is copied into each directory where we compile | |
34 | * the kernel; it should be modified there to suit local taste | |
35 | * if necessary. | |
36 | * | |
37 | * Compiled with -DHZ=xx -DTIMEZONE=x -DDST=x -DMAXUSERS=xx | |
38 | */ | |
39 | ||
46a9a1d7 MK |
40 | #ifndef HZ |
41 | #ifdef VAX | |
bf75e5ce | 42 | #define HZ 100 |
46a9a1d7 MK |
43 | #endif |
44 | #ifdef TAHOE | |
45 | #define HZ 60 | |
46 | #endif | |
47 | #endif | |
ec6f91b0 | 48 | int hz = HZ; |
bf75e5ce | 49 | int tick = 1000000 / HZ; |
6f33ca1e | 50 | int tickadj = 240000 / (60 * HZ); /* can adjust 240ms in 60s */ |
bf75e5ce | 51 | struct timezone tz = { TIMEZONE, DST }; |
ec6f91b0 BJ |
52 | #define NPROC (20 + 8 * MAXUSERS) |
53 | int nproc = NPROC; | |
e0be43f9 | 54 | int ntext = 36 + MAXUSERS; |
6835b970 KM |
55 | #define NINODE ((NPROC + 16 + MAXUSERS) + 32) |
56 | int ninode = NINODE; | |
57 | int nchsize = NINODE * 11 / 10; | |
b025a45a | 58 | int nfile = 16 * (NPROC + 16 + MAXUSERS) / 10 + 32; |
2067e85f | 59 | int ncallout = 16 + NPROC; |
e31e5017 | 60 | int nclist = 60 + 12 * MAXUSERS; |
5b3fa994 | 61 | int nmbclusters = NMBCLUSTERS; |
af0b24db | 62 | #ifdef QUOTA |
72d2d310 KM |
63 | int nquota = (MAXUSERS * 9) / 7 + 3; |
64 | int ndquot = NINODE + (MAXUSERS * NMOUNT) / 4; | |
ab12a1f4 | 65 | #endif |
ec6f91b0 BJ |
66 | |
67 | /* | |
68 | * These are initialized at bootstrap time | |
69 | * to values dependent on memory size | |
70 | */ | |
71 | int nbuf, nswbuf; | |
72 | ||
73 | /* | |
74 | * These have to be allocated somewhere; allocating | |
6f33ca1e MK |
75 | * them here forces loader errors if this file is omitted |
76 | * (if they've been externed everywhere else; hah!). | |
ec6f91b0 BJ |
77 | */ |
78 | struct proc *proc, *procNPROC; | |
79 | struct text *text, *textNTEXT; | |
80 | struct inode *inode, *inodeNINODE; | |
81 | struct file *file, *fileNFILE; | |
82 | struct callout *callout; | |
83 | struct cblock *cfree; | |
ec6f91b0 | 84 | struct buf *buf, *swbuf; |
ec6f91b0 BJ |
85 | char *buffers; |
86 | struct cmap *cmap, *ecmap; | |
6f33ca1e | 87 | struct namecache *namecache; |
af0b24db | 88 | #ifdef QUOTA |
ab12a1f4 SL |
89 | struct quota *quota, *quotaNQUOTA; |
90 | struct dquot *dquot, *dquotNDQUOT; | |
91 | #endif |