|
|
1.1 ! root 1: /* param.c 6.1 83/07/29 */ ! 2: ! 3: #include "../h/param.h" ! 4: #include "../h/systm.h" ! 5: #include "../h/socket.h" ! 6: #include "../h/dir.h" ! 7: #include "../h/user.h" ! 8: #include "../h/proc.h" ! 9: #include "../h/text.h" ! 10: #include "../h/inode.h" ! 11: #include "../h/file.h" ! 12: #include "../h/callout.h" ! 13: #include "../h/clist.h" ! 14: #include "../h/cmap.h" ! 15: #include "../h/mbuf.h" ! 16: #include "../h/quota.h" ! 17: #include "../h/kernel.h" ! 18: #include "../h/msg.h" ! 19: ! 20: /* ! 21: * System parameter formulae. ! 22: * ! 23: * This file is copied into each directory where we compile ! 24: * the kernel; it should be modified there to suit local taste ! 25: * if necessary. ! 26: * ! 27: * Compiled with -DHZ=xx -DTIMEZONE=x -DDST=x -DMAXUSERS=xx ! 28: */ ! 29: ! 30: int hz = HZ; ! 31: int tick = 1000000 / HZ; ! 32: struct timezone tz = { TIMEZONE, DST }; ! 33: #define NPROC (20 + 8 * MAXUSERS) ! 34: #ifdef SYS5 ! 35: # if NPROC > 511 ! 36: # undef NPROC ! 37: # define NPROC 511 ! 38: # endif ! 39: #else ! 40: # if NPROC > 1023 ! 41: # undef NPROC ! 42: # define NPROC 1023 ! 43: # endif ! 44: #endif SYS5 ! 45: ! 46: int nproc = NPROC; ! 47: ! 48: #ifdef INET ! 49: #define NETSLOP 20 /* for all the lousy servers*/ ! 50: #else ! 51: #define NETSLOP 0 ! 52: #endif ! 53: int ntext = 24 + MAXUSERS + NETSLOP; ! 54: int ninode = (NPROC + 16 + MAXUSERS) + 32; ! 55: int nfile = 16 * (NPROC + 16 + MAXUSERS) / 10 + 32 + 2 * NETSLOP; ! 56: int ncallout = 16 + NPROC; ! 57: int nclist = 100 + 16 * MAXUSERS; ! 58: int nport = NPROC / 2; ! 59: int nmbclusters = NMBCLUSTERS; ! 60: #ifdef QUOTA ! 61: int nquota = (MAXUSERS * 9)/7 + 3; ! 62: int ndquot = (MAXUSERS*NMOUNT)/4 + NPROC; ! 63: #endif ! 64: ! 65: #ifdef AUDITTRAIL ! 66: int naudbuf = (MAXUSERS * 16 + 15) & ~15; ! 67: #endif AUDITTRAIL ! 68: ! 69: #ifdef SYS5 ! 70: int dmshm = DMSHM; ! 71: int nshmem = SHMMNI; ! 72: struct shmid_ds *shmem, *shmemNSHMEM; ! 73: struct shminfo shminfo = { ! 74: SHMMAX, ! 75: SHMMIN, ! 76: SHMMNI, ! 77: SHMSEG, ! 78: SHMBRK, ! 79: SHMALL ! 80: }; ! 81: struct seminfo seminfo = { ! 82: SEMMAP, ! 83: SEMMNI, ! 84: SEMMNS, ! 85: SEMMNU, ! 86: SEMMSL, ! 87: SEMOPM, ! 88: SEMUME, ! 89: SEMUSZ, ! 90: SEMVMX, ! 91: SEMAEM ! 92: }; ! 93: struct msqid_ds *msgque, *msgqueNMSGQUE; ! 94: int nmsgque = MSGMNI; ! 95: struct msginfo msginfo = { ! 96: MSGMAP, ! 97: MSGMAX, ! 98: MSGMNB, ! 99: MSGMNI, ! 100: MSGSSZ, ! 101: MSGTQL, ! 102: MSGSEG ! 103: }; ! 104: #endif SYS5 ! 105: ! 106: /* ! 107: * These are initialized at bootstrap time ! 108: * to values dependent on memory size ! 109: */ ! 110: int nbuf, nswbuf; ! 111: ! 112: /* ! 113: * These have to be allocated somewhere; allocating ! 114: * them here forces loader errors if this file is omitted. ! 115: */ ! 116: struct proc *proc, *procNPROC; ! 117: struct text *text, *textNTEXT; ! 118: struct inode *inode, *inodeNINODE; ! 119: struct file *file, *fileNFILE; ! 120: struct callout *callout; ! 121: struct cblock *cfree; ! 122: struct buf *buf, *swbuf; ! 123: short *swsize; ! 124: int *swpf; ! 125: char *buffers; ! 126: struct cmap *cmap, *ecmap; ! 127: #ifdef QUOTA ! 128: struct quota *quota, *quotaNQUOTA; ! 129: struct dquot *dquot, *dquotNDQUOT; ! 130: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.