sys => kern
[unix-history] / usr / src / sys / conf / param.c
CommitLineData
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 *
2f44f7b7 6 * @(#)param.c 7.4 (Berkeley) %G%
b1078c35
KM
7 */
8
9#ifndef lint
10char 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 14
2f44f7b7
KM
15#include "../sys/param.h"
16#include "../sys/systm.h"
17#include "../sys/socket.h"
18#include "../ufs/dir.h"
19#include "../sys/user.h"
20#include "../sys/proc.h"
21#include "../sys/text.h"
22#include "../ufs/inode.h"
23#include "../sys/file.h"
24#include "../sys/callout.h"
25#include "../sys/clist.h"
26#include "../sys/cmap.h"
27#include "../sys/mbuf.h"
28#include "../ufs/quota.h"
29#include "../sys/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 40#ifndef HZ
bf75e5ce 41#define HZ 100
46a9a1d7 42#endif
ec6f91b0 43int hz = HZ;
bf75e5ce 44int tick = 1000000 / HZ;
6f33ca1e 45int tickadj = 240000 / (60 * HZ); /* can adjust 240ms in 60s */
bf75e5ce 46struct timezone tz = { TIMEZONE, DST };
ec6f91b0
BJ
47#define NPROC (20 + 8 * MAXUSERS)
48int nproc = NPROC;
e0be43f9 49int ntext = 36 + MAXUSERS;
6835b970
KM
50#define NINODE ((NPROC + 16 + MAXUSERS) + 32)
51int ninode = NINODE;
52int nchsize = NINODE * 11 / 10;
b025a45a 53int nfile = 16 * (NPROC + 16 + MAXUSERS) / 10 + 32;
2067e85f 54int ncallout = 16 + NPROC;
e31e5017 55int nclist = 60 + 12 * MAXUSERS;
5b3fa994 56int nmbclusters = NMBCLUSTERS;
af0b24db 57#ifdef QUOTA
72d2d310
KM
58int nquota = (MAXUSERS * 9) / 7 + 3;
59int ndquot = NINODE + (MAXUSERS * NMOUNT) / 4;
ab12a1f4 60#endif
ec6f91b0
BJ
61
62/*
63 * These are initialized at bootstrap time
64 * to values dependent on memory size
65 */
66int nbuf, nswbuf;
67
68/*
69 * These have to be allocated somewhere; allocating
6f33ca1e
MK
70 * them here forces loader errors if this file is omitted
71 * (if they've been externed everywhere else; hah!).
ec6f91b0
BJ
72 */
73struct proc *proc, *procNPROC;
74struct text *text, *textNTEXT;
75struct inode *inode, *inodeNINODE;
76struct file *file, *fileNFILE;
77struct callout *callout;
78struct cblock *cfree;
ec6f91b0 79struct buf *buf, *swbuf;
ec6f91b0
BJ
80char *buffers;
81struct cmap *cmap, *ecmap;
6f33ca1e 82struct namecache *namecache;
af0b24db 83#ifdef QUOTA
ab12a1f4
SL
84struct quota *quota, *quotaNQUOTA;
85struct dquot *dquot, *dquotNDQUOT;
86#endif