X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/15637ed4f028f1b013a54c226bcb3c75228ad20d..795abf1316db53d4abdc5bff180f2b2376c5cfe4:/sys/conf/param.c diff --git a/sys/conf/param.c b/sys/conf/param.c index 6444f9608d..17c3314a27 100644 --- a/sys/conf/param.c +++ b/sys/conf/param.c @@ -1,3 +1,10 @@ +/* + * Copyright (c) UNIX System Laboratories, Inc. All or some portions + * of this file are derived from material licensed to the + * University of California by American Telephone and Telegraph Co. + * or UNIX System Laboratories, Inc. and are reproduced herein with + * the permission of UNIX System Laboratories, Inc. + */ /* * Copyright (c) 1980, 1986, 1989 Regents of the University of California. * All rights reserved. @@ -30,7 +37,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)param.c 7.20 (Berkeley) 6/27/91 + * from: @(#)param.c 7.20 (Berkeley) 6/27/91 + * $Id: param.c,v 1.9 1994/02/02 17:56:54 ache Exp $ */ #include "sys/param.h" @@ -48,6 +56,12 @@ #include "machine/vmparam.h" #include "sys/shm.h" #endif +#ifdef SYSVSEM +#include "sys/sem.h" +#endif +#ifdef SYSVMSG +#include "sys/msg.h" +#endif /* * System parameter formulae. @@ -56,7 +70,7 @@ * the kernel; it should be modified there to suit local taste * if necessary. * - * Compiled with -DHZ=xx -DTIMEZONE=x -DDST=x -DMAXUSERS=xx + * Compiled with -DHZ=xx -DTIMEZONE=x -DDST=x -DMAXUSERS=xx -DMAXFDESCS=xx */ #ifndef HZ @@ -64,13 +78,19 @@ #endif int hz = HZ; int tick = 1000000 / HZ; +#ifndef TICKADJ int tickadj = 240000 / (60 * HZ); /* can adjust 240ms in 60s */ +#else +int tickadj = TICKADJ; /* NTP users may prefer a smaller value */ +#endif struct timezone tz = { TIMEZONE, DST }; #define NPROC (20 + 16 * MAXUSERS) int maxproc = NPROC; -#define NTEXT (80 + NPROC / 8) /* actually the object cache */ -#define NVNODE (NPROC + NTEXT + 100) +#define NTEXT NPROC /* actually the object cache */ +int vm_cache_max = NTEXT / 2 + 16; +#define NVNODE (NPROC + NTEXT + 100 + 16) long desiredvnodes = NVNODE; +int maxfdescs = MAXFDESCS; int maxfiles = 3 * (NPROC + MAXUSERS) + 80; int ncallout = 16 + NPROC; int nclist = 60 + 12 * MAXUSERS; @@ -96,6 +116,43 @@ struct shminfo shminfo = { }; #endif +/* + * Values in support of System V compatible semaphores. + */ + +#ifdef SYSVSEM + +struct seminfo seminfo = { + SEMMAP, /* # of entries in semaphore map */ + SEMMNI, /* # of semaphore identifiers */ + SEMMNS, /* # of semaphores in system */ + SEMMNU, /* # of undo structures in system */ + SEMMSL, /* max # of semaphores per id */ + SEMOPM, /* max # of operations per semop call */ + SEMUME, /* max # of undo entries per process */ + SEMUSZ, /* size in bytes of undo structure */ + SEMVMX, /* semaphore maximum value */ + SEMAEM /* adjust on exit max value */ +}; +#endif + +/* + * Values in support of System V compatible messages. + */ + +#ifdef SYSVMSG + +struct msginfo msginfo = { + MSGMAX, /* max chars in a message */ + MSGMNI, /* # of message queue identifiers */ + MSGMNB, /* max chars in a queue */ + MSGTQL, /* max messages in system */ + MSGSSZ, /* size of a message segment */ + /* (must be small power of 2 greater than 4) */ + MSGSEG /* number of message segments */ +}; +#endif + /* * These are initialized at bootstrap time * to values dependent on memory size @@ -136,3 +193,28 @@ char *buffers; struct proc *pidhash[PIDHSZ]; struct pgrp *pgrphash[PIDHSZ]; int pidhashmask = PIDHSZ - 1; + +/* From kernel.h: */ +long hostid; +char hostname[MAXHOSTNAMELEN]; +int hostnamelen; +char domainname[MAXHOSTNAMELEN]; +int domainnamelen; + +struct timeval boottime; +struct timeval time; + +int phz; +int lbolt; + +fixpt_t avenrunnable[3]; +#if defined(COMPAT_43) && (defined(vax) || defined(tahoe)) +double avenrun[3]; +#endif /* COMPAT_43 */ + +#ifdef GPROF +u_long s_textsize; +int profiling; +u_short *kcount; +char *s_lowpc; +#endif