1: /*
   2:  * Copyright (c) 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.h	1.6 (2.11BSD) 1999/9/5
   7:  */
   8: 
   9: #define BSD 211     /* 2.11 * 10, as cpp doesn't do floats */
  10: 
  11: #include <sys/localopts.h>
  12: #include <sys/stddef.h>     /* for 'offsetof' */
  13: 
  14: /*
  15:  * Machine type dependent parameters.
  16:  */
  17: #include <machine/machparam.h>
  18: 
  19: /*
  20:  * Machine-independent constants
  21:  */
  22: #define NMOUNT  6       /* number of mountable file systems */
  23: #define MAXUPRC 20      /* max processes per user */
  24: #define NOFILE  30      /* max open files per process */
  25: #define CANBSIZ 256     /* max size of typewriter line */
  26: #define NCARGS  5120        /* # characters in exec arglist */
  27: #define NGROUPS 16      /* max number groups */
  28: 
  29: #define NOGROUP 65535       /* marker for empty group set member */
  30: 
  31: /*
  32:  * Priorities
  33:  */
  34: #define PSWP    0
  35: #define PINOD   10
  36: #define PRIBIO  20
  37: #define PRIUBA  24
  38: #define PZERO   25
  39: #define PPIPE   26
  40: #define PSOCK   26
  41: #define PWAIT   30
  42: #define PLOCK   35
  43: #define PPAUSE  40
  44: #define PUSER   50
  45: 
  46: #define NZERO   0
  47: 
  48: #define PRIMASK 0xff
  49: #define PCATCH  0x100
  50: 
  51: /*
  52:  * Signals
  53:  */
  54: #include <signal.h>
  55: 
  56: #define NBPW    sizeof(int) /* number of bytes in an integer */
  57: 
  58: #ifndef NULL
  59: #define NULL    0
  60: #endif
  61: #define CMASK   026     /* default mask for file creation */
  62: #define NODEV   (dev_t)(-1)
  63: 
  64: #define CLBYTES     (CLSIZE*NBPG)
  65: #define CLOFSET     (CLBYTES-1)
  66: #define claligned(x)    ((((int)(x))&CLOFSET)==0)
  67: #define CLOFF       CLOFSET
  68: #define CLSHIFT     (PGSHIFT + CLSIZELOG2)
  69: 
  70: /* round a number of clicks up to a whole cluster */
  71: #define clrnd(i)    (((i) + (CLSIZE-1)) &~ ((long)(CLSIZE-1)))
  72: 
  73: /* CBLOCK is the size of a clist block, must be power of 2 */
  74: #define CBLOCK  32
  75: #define CBSIZE  (CBLOCK - sizeof(struct cblock *))  /* data chars/clist */
  76: #define CROUND  (CBLOCK - 1)                /* clist rounding */
  77: 
  78: #include    <sys/types.h>
  79: 
  80: /*
  81:  * File system parameters and macros.
  82:  *
  83:  * The file system is made out of blocks of most MAXBSIZE units.
  84:  */
  85: #define MAXBSIZE    1024
  86: 
  87: /*
  88:  * MAXPATHLEN defines the longest permissable path length
  89:  * after expanding symbolic links. It is used to allocate
  90:  * a temporary buffer from the buffer pool in which to do the
  91:  * name expansion, hence should be a power of two, and must
  92:  * be less than or equal to MAXBSIZE.
  93:  * MAXSYMLINKS defines the maximum number of symbolic links
  94:  * that may be expanded in a path name. It should be set high
  95:  * enough to allow all legitimate uses, but halt infinite loops
  96:  * reasonably quickly.
  97:  */
  98: #define MAXPATHLEN  256
  99: #define MAXSYMLINKS 8
 100: 
 101: /*
 102:  * Macros for fast min/max.
 103:  */
 104: #define MIN(a,b) (((a)<(b))?(a):(b))
 105: #define MAX(a,b) (((a)>(b))?(a):(b))
 106: 
 107: /*
 108:  * Macros for counting and rounding.
 109:  */
 110: #ifndef howmany
 111: #define howmany(x, y)   (((x)+((y)-1))/(y))
 112: #endif
 113: #define roundup(x, y)   ((((x)+((y)-1))/(y))*(y))
 114: 
 115: /*
 116:  * Maximum size of hostname recognized and stored in the kernel.
 117:  */
 118: #define MAXHOSTNAMELEN  64
 119: 
 120: #if defined(KERNEL) && defined(INET)
 121: #include "../machine/net_mac.h"
 122: #endif
 123: 
 124: /*
 125:  * MAXMEM is the maximum core per process is allowed.  First number is Kb.
 126: */
 127: #define MAXMEM      (300*16)
 128: 
 129: /*
 130:  * MAXLOGNAME should be >= UT_NAMESIZE (see <utmp.h>)
 131:  */
 132: #define MAXLOGNAME  16      /* max login name length */

Defined macros

CANBSIZ defined in line 25; never used
CBLOCK defined in line 74; used 2 times
CLOFF defined in line 67; never used
CLOFSET defined in line 65; used 3 times
CLSHIFT defined in line 68; never used
CROUND defined in line 76; used 30 times
MAXHOSTNAMELEN defined in line 118; used 73 times
MAXMEM defined in line 127; used 3 times
MAXPATHLEN defined in line 98; used 175 times
MAXSYMLINKS defined in line 99; used 1 times
MAXUPRC defined in line 23; used 1 times
MIN defined in line 104; used 83 times
NULL defined in line 59; used 1031 times
NZERO defined in line 46; used 6 times
PLOCK defined in line 42; used 2 times
PPAUSE defined in line 43; used 2 times
PPIPE defined in line 39; used 2 times
PRIMASK defined in line 48; used 1 times
PRIUBA defined in line 37; never used
PSOCK defined in line 40; used 1 times
PUSER defined in line 44; used 4 times
PWAIT defined in line 41; used 1 times
claligned defined in line 66; never used
clrnd defined in line 71; used 3 times
howmany defined in line 111; used 3 times

Usage of this include

param.h used 451 times
Last modified: 1999-09-16
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 6107
Valid CSS Valid XHTML 1.0 Strict