Annotation of 43BSDTahoe/sys/GENERIC/param.c, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 1980, 1986 Regents of the University of California.
                      3:  * All rights reserved.  The Berkeley software License Agreement
                      4:  * specifies the terms and conditions for redistribution.
                      5:  *
                      6:  *     @(#)param.c     7.3 (Berkeley) 12/6/86
                      7:  */
                      8: 
                      9: #ifndef lint
                     10: char copyright[] =
                     11: "@(#) Copyright (c) 1980, 1986 Regents of the University of California.\n\
                     12:  All rights reserved.\n";
                     13: #endif not lint
                     14: 
                     15: #include "../h/param.h"
                     16: #include "../h/systm.h"
                     17: #include "../h/socket.h"
                     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"
                     27: #include "../h/mbuf.h"
                     28: #include "../h/quota.h"
                     29: #include "../h/kernel.h"
                     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: 
                     40: #ifndef HZ
                     41: #define        HZ 100
                     42: #endif
                     43: int    hz = HZ;
                     44: int    tick = 1000000 / HZ;
                     45: int    tickadj = 240000 / (60 * HZ);           /* can adjust 240ms in 60s */
                     46: struct timezone tz = { TIMEZONE, DST };
                     47: #define        NPROC (20 + 8 * MAXUSERS)
                     48: int    nproc = NPROC;
                     49: int    ntext = 36 + MAXUSERS;
                     50: #define NINODE ((NPROC + 16 + MAXUSERS) + 32)
                     51: int    ninode = NINODE;
                     52: int    nchsize = NINODE * 11 / 10;
                     53: int    nfile = 16 * (NPROC + 16 + MAXUSERS) / 10 + 32;
                     54: int    ncallout = 16 + NPROC;
                     55: int    nclist = 60 + 12 * MAXUSERS;
                     56: int     nmbclusters = NMBCLUSTERS;
                     57: #ifdef QUOTA
                     58: int    nquota = (MAXUSERS * 9) / 7 + 3;
                     59: int    ndquot = NINODE + (MAXUSERS * NMOUNT) / 4;
                     60: #endif
                     61: 
                     62: /*
                     63:  * These are initialized at bootstrap time
                     64:  * to values dependent on memory size
                     65:  */
                     66: int    nbuf, nswbuf;
                     67: 
                     68: /*
                     69:  * These have to be allocated somewhere; allocating
                     70:  * them here forces loader errors if this file is omitted
                     71:  * (if they've been externed everywhere else; hah!).
                     72:  */
                     73: struct proc *proc, *procNPROC;
                     74: struct text *text, *textNTEXT;
                     75: struct inode *inode, *inodeNINODE;
                     76: struct file *file, *fileNFILE;
                     77: struct         callout *callout;
                     78: struct cblock *cfree;
                     79: struct buf *buf, *swbuf;
                     80: char   *buffers;
                     81: struct cmap *cmap, *ecmap;
                     82: struct namecache *namecache;
                     83: #ifdef QUOTA
                     84: struct quota *quota, *quotaNQUOTA;
                     85: struct dquot *dquot, *dquotNDQUOT;
                     86: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.