1: /*
   2:  * System parameters.
   3:  *
   4:  * This file is copied into each directory where we compile
   5:  * the kernel; it should be modified there to suit local taste
   6:  * if necessary.
   7:  *
   8:  */
   9: #include    "param.h"
  10: #include    <sys/systm.h>
  11: #include    <sys/buf.h>
  12: #include    <sys/tty.h>
  13: #include    <sys/conf.h>
  14: #include    <sys/proc.h>
  15: #include    <sys/text.h>
  16: #include    <sys/dir.h>
  17: #include    <sys/user.h>
  18: #include    <sys/file.h>
  19: #include    <sys/inode.h>
  20: #include    <sys/filsys.h>
  21: #include    <sys/mount.h>
  22: #include    <sys/callout.h>
  23: #include    <sys/acct.h>
  24: #include    <sys/map.h>
  25: #include    <sys/seg.h>
  26: 
  27: #define HZ  60          /* Ticks/second of the clock */
  28: #define TIMEZONE (8 * 60)       /* Minutes westward from Greenwich */
  29: #define DSTFLAG 1           /* Daylight Saving Time applies here */
  30: 
  31: #define NBUF    (12 + (2 * MAXUSERS))   /* size of buffer cache, must be <=256*/
  32: #define NMOUNT  5           /* number of mountable file systems */
  33: 
  34: #ifdef  UCB_CLIST
  35: #   ifdef UNIBUS_MAP
  36: #	define NCLIST 500     /* number of clists, must be <= 512 */
  37: #   else
  38: #	define NCLIST 200     /* number of clists */
  39: #   endif
  40: #else   UCB_CLIST
  41: #	define NCLIST 100     /* number of clists */
  42: #endif	UCB_CLIST
  43: 
  44: #define NPROC   (10 + (7 * MAXUSERS))       /* max number of processes */
  45: #define NTEXT   (20 + ((3*MAXUSERS) / 2))   /* max number of pure texts */
  46: #define NINODE  (NPROC + 20 + (2 * MAXUSERS))   /* number of in-core inodes */
  47: #define NFILE   ((8 * NINODE/10) + 5)       /* number of file structures */
  48: #define NCALL   (4 + MAXUSERS)      /* max simultaneous time callouts */
  49: #define NDISK   3           /* number of disks to monitor */
  50: 
  51: #ifndef UNIBUS_MAP
  52: #   define CMAPSIZ NPROC        /* size of core allocation map */
  53: #   define SMAPSIZ (NPROC+(5*NTEXT/10)) /* size of swap allocation map */
  54: #else
  55: #   define CMAPSIZ (NPROC+(8*NTEXT/10)) /* size of core allocation map */
  56: #   define SMAPSIZ (NPROC+(8*NTEXT/10)) /* size of swap allocation map */
  57: #endif
  58: 
  59: int maxusers = MAXUSERS;
  60: int hz  = HZ;
  61: int timezone = TIMEZONE;
  62: bool_t  dstflag = DSTFLAG;
  63: int nmount  = NMOUNT;
  64: int nfile   = NFILE;
  65: int ninode  = NINODE;
  66: int nproc   = NPROC;
  67: int ntext   = NTEXT;
  68: int nbuf    = NBUF;
  69: int nclist  = NCLIST;
  70: int ncallout = NCALL;
  71: int ndisk   = NDISK;
  72: int cmapsiz = CMAPSIZ;
  73: int smapsiz = SMAPSIZ;
  74: 
  75: struct  mount   mount[NMOUNT];
  76: struct  inode   inode[NINODE];
  77: struct  buf buf[NBUF];
  78: struct  callout callout[NCALL + 1]; /* last one used as a delimiter */
  79: struct  buf bfreelist;
  80: #ifndef UCB_CLIST
  81: struct  cblock  cfree[NCLIST];
  82: #else
  83: unsigned clstdesc = ((((btoc(NCLIST*sizeof(struct cblock)))-1) << 8) | RW);
  84: #endif
  85: long    dk_time[1 << (NDISK)];
  86: long    dk_numb[NDISK];
  87: long    dk_wds[NDISK];
  88: 
  89: struct mapent _coremap[CMAPSIZ];
  90: struct map coremap[1] = {
  91:     _coremap,
  92:     &_coremap[CMAPSIZ],
  93:     "coremap"
  94: };
  95: 
  96: struct mapent _swapmap[SMAPSIZ];
  97: struct map swapmap[1] = {
  98:     _swapmap,
  99:     &_swapmap[SMAPSIZ],
 100:     "swapmap"
 101: };
 102: 
 103: struct  mount   *mountNMOUNT    = &mount[NMOUNT];
 104: struct  file    *fileNFILE  = &file[NFILE];
 105: struct  inode   *inodeNINODE    = &inode[NINODE];
 106: struct  proc    *procNPROC  = &proc[NPROC];
 107: struct  text    *textNTEXT  = &text[NTEXT];
 108: /* callNCALL points to the last slot, which must be a terminator */
 109: struct  callout *callNCALL  = &callout[NCALL];
 110: 
 111: #ifdef  UCB_METER
 112: char    counted[NTEXT];
 113: #endif
 114: 
 115: int bsize   = BSIZE + BSLOP;    /* size of buffers */
 116: 
 117: #ifdef ACCT
 118: struct  acct    acctbuf;
 119: struct  inode   *acctp;
 120: #endif
 121: 
 122: char msgbuf[MSGBUFS]    = {"\0"};
 123: 
 124: /*
 125:  *  Declarations of structures loaded last and allowed to
 126:  *  reside in the 0120000-140000 range (where buffers and clists are
 127:  *  mapped).  These structures must be extern everywhere else,
 128:  *  and the asm output of cc is edited to move these structures
 129:  *  from comm to bss (which is last) (see the script :comm-to-bss).
 130:  */
 131: int remap_area; /* start of possibly mapped area; must be first */
 132: struct  proc    proc[NPROC];
 133: struct  file    file[NFILE];
 134: struct  text    text[NTEXT];

Defined variables

_coremap defined in line 89; used 2 times
_swapmap defined in line 96; used 2 times
acctbuf defined in line 118; never used
acctp defined in line 119; never used
bfreelist defined in line 79; never used
bsize defined in line 115; never used
buf defined in line 77; never used
callNCALL defined in line 109; never used
callout defined in line 78; used 1 times
cfree defined in line 81; used 2 times
clstdesc defined in line 83; used 13 times
cmapsiz defined in line 72; never used
coremap defined in line 90; never used
counted defined in line 112; never used
dk_numb defined in line 86; never used
dk_time defined in line 85; never used
dk_wds defined in line 87; never used
dstflag defined in line 62; never used
file defined in line 133; used 1 times
fileNFILE defined in line 104; never used
hz defined in line 60; never used
inode defined in line 76; used 1 times
inodeNINODE defined in line 105; never used
maxusers defined in line 59; never used
mount defined in line 75; used 1 times
mountNMOUNT defined in line 103; never used
msgbuf defined in line 122; never used
nbuf defined in line 68; never used
ncallout defined in line 70; never used
nclist defined in line 69; never used
ndisk defined in line 71; never used
nfile defined in line 64; never used
ninode defined in line 65; never used
nmount defined in line 63; never used
nproc defined in line 66; never used
ntext defined in line 67; never used
proc defined in line 132; used 1 times
procNPROC defined in line 106; never used
remap_area defined in line 131; never used
smapsiz defined in line 73; never used
swapmap defined in line 97; never used
text defined in line 134; used 1 times
textNTEXT defined in line 107; never used
timezone defined in line 61; never used

Defined macros

CMAPSIZ defined in line 55; used 3 times
DSTFLAG defined in line 29; used 1 times
  • in line 62
HZ defined in line 27; used 1 times
  • in line 60
NBUF defined in line 31; used 2 times
NCALL defined in line 48; used 3 times
NCLIST defined in line 41; used 3 times
NDISK defined in line 49; used 4 times
NFILE defined in line 47; used 3 times
NINODE defined in line 46; used 4 times
NMOUNT defined in line 32; used 3 times
NPROC defined in line 44; used 8 times
NTEXT defined in line 45; used 7 times
SMAPSIZ defined in line 56; used 3 times
TIMEZONE defined in line 28; used 1 times
  • in line 61
Last modified: 1983-05-31
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1281
Valid CSS Valid XHTML 1.0 Strict