Annotation of 43BSD/sys/conf/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.1 (Berkeley) 6/5/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: #define        HZ 100
                     41: int    hz = HZ;
                     42: int    tick = 1000000 / HZ;
                     43: int    tickadj = 240000 / (60 * HZ);           /* can adjust 240ms in 60s */
                     44: struct timezone tz = { TIMEZONE, DST };
                     45: #define        NPROC (20 + 8 * MAXUSERS)
                     46: int    nproc = NPROC;
                     47: int    ntext = 36 + MAXUSERS;
                     48: #define NINODE ((NPROC + 16 + MAXUSERS) + 32)
                     49: int    ninode = NINODE;
                     50: int    nchsize = NINODE * 11 / 10;
                     51: int    nfile = 16 * (NPROC + 16 + MAXUSERS) / 10 + 32;
                     52: int    ncallout = 16 + NPROC;
                     53: int    nclist = 60 + 12 * MAXUSERS;
                     54: int     nmbclusters = NMBCLUSTERS;
                     55: #ifdef QUOTA
                     56: int    nquota = (MAXUSERS * 9) / 7 + 3;
                     57: int    ndquot = NINODE + (MAXUSERS * NMOUNT) / 4;
                     58: #endif
                     59: 
                     60: /*
                     61:  * These are initialized at bootstrap time
                     62:  * to values dependent on memory size
                     63:  */
                     64: int    nbuf, nswbuf;
                     65: 
                     66: /*
                     67:  * These have to be allocated somewhere; allocating
                     68:  * them here forces loader errors if this file is omitted
                     69:  * (if they've been externed everywhere else; hah!).
                     70:  */
                     71: struct proc *proc, *procNPROC;
                     72: struct text *text, *textNTEXT;
                     73: struct inode *inode, *inodeNINODE;
                     74: struct file *file, *fileNFILE;
                     75: struct         callout *callout;
                     76: struct cblock *cfree;
                     77: struct buf *buf, *swbuf;
                     78: char   *buffers;
                     79: struct cmap *cmap, *ecmap;
                     80: struct namecache *namecache;
                     81: #ifdef QUOTA
                     82: struct quota *quota, *quotaNQUOTA;
                     83: struct dquot *dquot, *dquotNDQUOT;
                     84: #endif

unix.superglobalmegacorp.com

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