1: #ifndef _WHOAMI
   2: #include    "whoami.h"
   3: #endif
   4: #ifndef NSIG
   5: #include    <signal.h>
   6: #endif
   7: #include    <sys/psw.h>
   8: #include    <sys/types.h>
   9: #include    <sys/iopage.h>
  10: 
  11: #ifdef  UNIBUS_MAP
  12: #define MAXMEM  (200*16)    /* max core per process - first # is Kb */
  13: #else
  14: #define MAXMEM  (128*16)    /* max core per process - first # is Kb */
  15: #endif
  16: #define MAXUPRC 20      /* max processes per user */
  17: #define SSIZE   20      /* initial stack size (*64 bytes) */
  18: #define SINCR   20      /* increment of stack (*64 bytes) */
  19: #define NOFILE  20      /* max open files per process */
  20: #define CANBSIZ 256     /* max size of typewriter line */
  21: #define MSGBUFS 128     /* Characters saved from error messages */
  22: #define NCARGS  5120        /* # characters in exec arglist */
  23: #ifdef  UCB_METER
  24: #define MAXSLP  20      /* max time a process is considered sleeping */
  25: #endif
  26: 
  27: /*
  28:  * priorities
  29:  * probably should not be
  30:  * altered too much
  31:  */
  32: #ifdef  CGL_RTP
  33: #define PRTP    0
  34: #define PSWP    5
  35: #else
  36: #define PSWP    0
  37: #endif
  38: #define PINOD   10
  39: #define PRIBIO  20
  40: #define PZERO   25
  41: #define PPIPE   26
  42: #define PWAIT   30
  43: #define PSLEP   40
  44: #define PUSER   50
  45: 
  46: #define NZERO   20
  47: 
  48: /*
  49:  * fundamental constants of the implementation--
  50:  * cannot be changed easily
  51:  */
  52: 
  53: #define NBPW    sizeof(int) /* number of bytes in an integer */
  54: 
  55: #define BSLOP   0       /* BSLOP can be 0 unless you have a TIU/Spider*/
  56: 
  57: #ifndef UCB_NKB
  58: #define BSIZE   512     /* size of secondary block (bytes) */
  59: #define NINDIR  (BSIZE/sizeof(daddr_t))
  60: #define BMASK   0777        /* BSIZE-1 */
  61: #define BSHIFT  9       /* LOG2(BSIZE) */
  62: #define NMASK   0177        /* NINDIR-1 */
  63: #define NSHIFT  7       /* LOG2(NINDIR) */
  64: #endif
  65: 
  66: #if UCB_NKB == 1
  67: #define CLSIZE  2       /* number of blocks / cluster */
  68: #define BSIZE   1024        /* size of secondary block (bytes) */
  69: #define NINDIR  (BSIZE/sizeof(daddr_t))
  70: #define BMASK   01777       /* BSIZE-1 */
  71: #define BSHIFT  10      /* LOG2(BSIZE) */
  72: #define NMASK   0377        /* NINDIR-1 */
  73: #define NSHIFT  8       /* LOG2(NINDIR) */
  74: #endif
  75: 
  76: #define UBSIZE  512     /* block size visible to users */
  77: #ifdef  UCB_QUOTAS
  78: #define QCOUNT  (BSIZE/UBSIZE)  /* BSIZE must always be a multiple of UBSIZE */
  79: #endif
  80: 
  81: #ifndef UCB_NET
  82: #define USIZE   16      /* size of user block (*64) */
  83: #else
  84: #define USIZE   32      /* size of user block (*64) */
  85: #endif
  86: #define NULL    0
  87: #define CMASK   0       /* default mask for file creation */
  88: #define NODEV   (dev_t)(-1)
  89: #define ROOTINO ((ino_t)2)  /* i number of all roots */
  90: #define SUPERB  ((daddr_t)1)    /* block number of the super block */
  91: #define DIRSIZ  14      /* max characters per directory */
  92: 
  93: #define NICINOD 100     /* number of superblock inodes */
  94: #define NICFREE 50      /* number of superblock free blocks */
  95: 
  96: #define CBSIZE  14      /* number of chars in a clist block */
  97:                 /* CBSIZE+sizeof(int *) must be a power of 2 */
  98: #define CROUND  017     /* clist rounding: sizeof(int *) + CBSIZE - 1*/
  99: 
 100: #define PGSIZE  512     /* bytes per addressable disk sector */
 101: #define PGSHIFT 9       /* LOG2(PGSIZE) */
 102: 
 103: /*
 104:  * Some macros for units conversion
 105:  */
 106: 
 107: /* Core clicks (64 bytes) to segments and vice versa */
 108: #define ctos(x)     (((x)+127)/128)
 109: #define stoc(x)     ((x)*128)
 110: 
 111: /* Core clicks (64 bytes) to disk blocks */
 112: #define ctod(x)     (((x)+7)>>3)
 113: 
 114: /* I number to disk address */
 115: #ifndef UCB_NKB
 116: #define itod(x)     (daddr_t)((((unsigned)(x)+15)>>3))
 117: #else
 118: #define itod(x)     ((daddr_t)((((unsigned)(x)+2*INOPB-1)/INOPB)))
 119: #endif
 120: 
 121: /* I number to disk offset */
 122: #ifndef UCB_NKB
 123: #define itoo(x)     (int)(((x)+15)&07)
 124: #else
 125: #define itoo(x)     ((int)(((x)+2*INOPB-1)%INOPB))
 126: #endif
 127: 
 128: #if UCB_NKB == 1
 129: /* file system blocks to disk blocks and back */
 130: #define fsbtodb(b)  ((daddr_t)((daddr_t)(b)<<1))
 131: #define dbtofsb(b)  ((daddr_t)((daddr_t)(b)>>1))
 132: #endif
 133: #ifndef UCB_NKB
 134: #define fsbtodb(b)  ((daddr_t)(b))
 135: #define dbtofsb(b)  ((daddr_t)(b))
 136: #endif
 137: 
 138: #ifdef  UCB_NKB
 139: /* round a number of clicks up to a whole cluster */
 140: #define clrnd(i)    (((i) + (CLSIZE-1)) & ~(CLSIZE-1))
 141: #endif
 142: 
 143: /* clicks to bytes */
 144: #define ctob(x)     ((x)<<6)
 145: 
 146: /* bytes to clicks */
 147: #define btoc(x)     ((((unsigned)(x)+63)>>6))
 148: 
 149: /* low int of a long */
 150: #define loint(l)    ((int) (l) & 0177777)
 151: 
 152: /* high int of a long */
 153: #define hiint(l)    ((int) ((l) >> 16))
 154: 
 155: /*
 156:  * Machine-dependent bits and macros
 157:  */
 158: 
 159: /*
 160:  * Treat PS as byte, to allow restoring value from mfps/movb
 161:  * (see :splfix.*)
 162:  */
 163: #define PS_LOBYTE   ((char *) 0177776)
 164: #define splx(ops)   (*PS_LOBYTE = ((char) (ops)))
 165: 
 166: #ifndef MIN
 167: #define MIN(a,b)    (((a)<(b))? (a):(b))
 168: #endif
 169: #define MAX(a,b)    (((a)>(b))? (a):(b))
 170: 
 171: #ifdef  UCB_NET
 172: /*
 173:  * Return values from tsleep().
 174:  */
 175: #define TS_OK   0   /* normal wakeup */
 176: #define TS_TIME 1   /* timed-out wakeup */
 177: #define TS_SIG  2   /* asynchronous signal wakeup */
 178: #endif

Defined macros

BMASK defined in line 70; used 2 times
BSHIFT defined in line 71; used 7 times
BSIZE defined in line 68; used 244 times
BSLOP defined in line 55; never used
CANBSIZ defined in line 20; never used
CBSIZE defined in line 96; never used
CLSIZE defined in line 67; used 8 times
CMASK defined in line 87; never used
CROUND defined in line 98; never used
DIRSIZ defined in line 91; used 1 times
MAX defined in line 169; never used
MAXMEM defined in line 14; used 1 times
MAXSLP defined in line 24; never used
MAXUPRC defined in line 16; never used
MIN defined in line 167; used 2 times
MSGBUFS defined in line 21; used 8 times
NBPW defined in line 53; never used
NCARGS defined in line 22; used 2 times
NICFREE defined in line 94; used 20 times
NICINOD defined in line 93; never used
NMASK defined in line 72; used 3 times
NODEV defined in line 88; used 7 times
NOFILE defined in line 19; used 2 times
NSHIFT defined in line 73; used 9 times
NULL defined in line 86; used 268 times
NZERO defined in line 46; never used
PGSHIFT defined in line 101; never used
PGSIZE defined in line 100; used 1 times
PINOD defined in line 38; never used
PPIPE defined in line 41; never used
PRIBIO defined in line 39; never used
PRTP defined in line 33; never used
PSLEP defined in line 43; never used
PSWP defined in line 36; never used
PS_LOBYTE defined in line 163; used 1 times
PUSER defined in line 44; never used
PWAIT defined in line 42; never used
PZERO defined in line 40; used 2 times
QCOUNT defined in line 78; never used
SINCR defined in line 18; never used
SSIZE defined in line 17; never used
SUPERB defined in line 90; used 4 times
TS_OK defined in line 175; never used
TS_SIG defined in line 177; never used
TS_TIME defined in line 176; never used
UBSIZE defined in line 76; used 1 times
  • in line 78
USIZE defined in line 84; used 13 times
btoc defined in line 147; used 10 times
clrnd defined in line 140; never used
ctod defined in line 112; used 1 times
dbtofsb defined in line 135; used 1 times
fsbtodb defined in line 134; used 8 times
hiint defined in line 153; never used
itod defined in line 118; used 5 times
itoo defined in line 125; used 4 times
loint defined in line 150; never used
splx defined in line 164; used 2 times

Usage of this include

param.h used 84 times
Last modified: 1983-05-24
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1326
Valid CSS Valid XHTML 1.0 Strict