BSD 4_3 release
[unix-history] / usr / src / sys / h / param.h
index bf5e7f0..f7c5c2a 100644 (file)
@@ -1,12 +1,21 @@
-/*     param.h 6.1     83/07/29        */
+/*
+ * Copyright (c) 1982, 1986 Regents of the University of California.
+ * All rights reserved.  The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ *
+ *     @(#)param.h     7.1 (Berkeley) 6/4/86
+ */
+
+#define        BSD     43              /* 4.3 * 10, as cpp doesn't do floats */
+#define BSD4_3 1
 
 /*
  * Machine type dependent parameters.
  */
 #ifdef KERNEL
 
 /*
  * Machine type dependent parameters.
  */
 #ifdef KERNEL
-#include "../machine/param.h"
+#include "../machine/machparam.h"
 #else
 #else
-#include <machine/param.h>
+#include <machine/machparam.h>
 #endif
 
 #define        NPTEPG          (NBPG/(sizeof (struct pte)))
 #endif
 
 #define        NPTEPG          (NBPG/(sizeof (struct pte)))
 /*
  * Machine-independent constants
  */
 /*
  * Machine-independent constants
  */
-#define        NMOUNT  15              /* number of mountable file systems */
-#define        MSWAPX  15              /* pseudo mount table index for swapdev */
-#define        MAXUPRC 25              /* max processes per user */
-#define        NOFILE  20              /* max open files per process */
-/* NOFILE MUST NOT BE >= 31; SEE pte.h */
+#define        NMOUNT  20              /* number of mountable file systems */
+/* NMOUNT must be <= 255 unless c_mdev (cmap.h) is expanded */
+#define        MSWAPX  NMOUNT          /* pseudo mount table index for swapdev */
+#define        MAXUPRC 40              /* max processes per user */
+#define        NOFILE  64              /* max open files per process */
 #define        CANBSIZ 256             /* max size of typewriter line */
 #define        CANBSIZ 256             /* max size of typewriter line */
-#define        NCARGS  10240           /* # characters in exec arglist */
-#define        NGROUPS               /* max number groups */
+#define        NCARGS  20480           /* # characters in exec arglist */
+#define        NGROUPS 16              /* max number groups */
 
 
-#define        NOGROUP -1              /* marker for empty group set member */
+#define        NOGROUP 65535           /* marker for empty group set member */
 
 /*
  * Priorities
 
 /*
  * Priorities
 #define        PSLEP   40
 #define        PUSER   50
 
 #define        PSLEP   40
 #define        PUSER   50
 
-#define        NZERO   20
+#define        NZERO   0
 
 /*
  * Signals
  */
 #ifdef KERNEL
 
 /*
  * Signals
  */
 #ifdef KERNEL
-#include "../h/signal.h"
+#include "signal.h"
 #else
 #include <signal.h>
 #endif
 #else
 #include <signal.h>
 #endif
        ((p)->p_sig && ((p)->p_flag&STRC || \
         ((p)->p_sig &~ ((p)->p_sigignore | (p)->p_sigmask))) && issig())
 
        ((p)->p_sig && ((p)->p_flag&STRC || \
         ((p)->p_sig &~ ((p)->p_sigignore | (p)->p_sigmask))) && issig())
 
-/*
- * Fundamental constants of the implementation.
- */
-#define        NBBY    8               /* number of bits in a byte */
 #define        NBPW    sizeof(int)     /* number of bytes in an integer */
 
 #define        NULL    0
 #define        NBPW    sizeof(int)     /* number of bytes in an integer */
 
 #define        NULL    0
-#define        CMASK   0               /* default mask for file creation */
+#define        CMASK   022             /* default mask for file creation */
 #define        NODEV   (dev_t)(-1)
 
 /*
  * Clustering of hardware pages on machines with ridiculously small
  * page sizes is done here.  The paging subsystem deals with units of
 #define        NODEV   (dev_t)(-1)
 
 /*
  * Clustering of hardware pages on machines with ridiculously small
  * page sizes is done here.  The paging subsystem deals with units of
- * CLSIZE pte's describing NBPG (from vm.h) pages each... BSIZE must
- * be CLSIZE*NBPG in the current implementation, that is the paging subsystem
- * deals with the same size blocks that the file system uses.
+ * CLSIZE pte's describing NBPG (from vm.h) pages each.
  *
  * NOTE: SSIZE, SINCR and UPAGES must be multiples of CLSIZE
  */
  *
  * NOTE: SSIZE, SINCR and UPAGES must be multiples of CLSIZE
  */
 #define        clrnd(i)        (((i) + (CLSIZE-1)) &~ (CLSIZE-1))
 #endif
 
 #define        clrnd(i)        (((i) + (CLSIZE-1)) &~ (CLSIZE-1))
 #endif
 
-#ifndef INTRLVE
-/* macros replacing interleaving functions */
-#define        dkblock(bp)     ((bp)->b_blkno)
-#define        dkunit(bp)      (minor((bp)->b_dev) >> 3)
-#endif
-
-#define        CBSIZE  28              /* number of chars in a clist block */
-#define        CROUND  0x1F            /* clist rounding; sizeof(int *) + CBSIZE -1*/
+/* CBLOCK is the size of a clist block, must be power of 2 */
+#define        CBLOCK  64
+#define        CBSIZE  (CBLOCK - sizeof(struct cblock *))      /* data chars/clist */
+#define        CROUND  (CBLOCK - 1)                            /* clist rounding */
 
 #ifndef KERNEL
 #include       <sys/types.h>
 #else
 #ifndef LOCORE
 
 #ifndef KERNEL
 #include       <sys/types.h>
 #else
 #ifndef LOCORE
-#include       "../h/types.h"
+#include       "types.h"
 #endif
 #endif
 
 #endif
 #endif
 
 /*
  * Macros for counting and rounding.
  */
 /*
  * Macros for counting and rounding.
  */
+#ifndef howmany
 #define        howmany(x, y)   (((x)+((y)-1))/(y))
 #define        howmany(x, y)   (((x)+((y)-1))/(y))
+#endif
 #define        roundup(x, y)   ((((x)+((y)-1))/(y))*(y))
 #define        roundup(x, y)   ((((x)+((y)-1))/(y))*(y))
+
+/*
+ * Maximum size of hostname recognized and stored in the kernel.
+ */
+#define MAXHOSTNAMELEN 64