home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Trees / V7 / usr / sys / h / smallparam.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-03  |  4.3 KB  |  145 lines

  1. /*
  2.  * tunable variables
  3.  */
  4.  
  5. #define    NBUF    8        /* size of buffer cache */
  6. #define    NINODE    75        /* number of in core inodes */
  7. #define    NFILE    75        /* number of in core file structures */
  8. #define    NMOUNT    3        /* number of mountable file systems */
  9. #define    MAXMEM    (64*32)        /* max core per process - first # is Kw */
  10. #define    MAXUPRC    15        /* max processes per user */
  11. #define    SSIZE    20        /* initial stack size (*64 bytes) */
  12. #define    SINCR    20        /* increment of stack (*64 bytes) */
  13. #define    NOFILE    20        /* max open files per process */
  14. #define    CANBSIZ    256        /* max size of typewriter line */
  15. #define    CMAPSIZ    50        /* size of core allocation area */
  16. #define    SMAPSIZ    50        /* size of swap allocation area */
  17. #define    NCALL    20        /* max simultaneous time callouts */
  18. #define    NPROC    50        /* max number of processes */
  19. #define    NTEXT    25        /* max number of pure texts */
  20. #define    NCLIST    100        /* max total clist size */
  21. #define    HZ    60        /* Ticks/second of the clock */
  22. #define    TIMEZONE (5*60)        /* Minutes westward from Greenwich */
  23. #define    DSTFLAG    1        /* Daylight Saving Time applies in this locality */
  24. #define    MSGBUFS    128        /* Characters saved from error messages */
  25. #define    NCARGS    5120        /* # characters in exec arglist */
  26.  
  27. /*
  28.  * priorities
  29.  * probably should not be
  30.  * altered too much
  31.  */
  32.  
  33. #define    PSWP    0
  34. #define    PINOD    10
  35. #define    PRIBIO    20
  36. #define    PZERO    25
  37. #define    NZERO    20
  38. #define    PPIPE    26
  39. #define    PWAIT    30
  40. #define    PSLEP    40
  41. #define    PUSER    50
  42.  
  43. /*
  44.  * signals
  45.  * dont change
  46.  */
  47.  
  48. #define    NSIG    17
  49. /*
  50.  * No more than 16 signals (1-16) because they are
  51.  * stored in bits in a word.
  52.  */
  53. #define    SIGHUP    1    /* hangup */
  54. #define    SIGINT    2    /* interrupt (rubout) */
  55. #define    SIGQUIT    3    /* quit (FS) */
  56. #define    SIGINS    4    /* illegal instruction */
  57. #define    SIGTRC    5    /* trace or breakpoint */
  58. #define    SIGIOT    6    /* iot */
  59. #define    SIGEMT    7    /* emt */
  60. #define    SIGFPT    8    /* floating exception */
  61. #define    SIGKIL    9    /* kill, uncatchable termination */
  62. #define    SIGBUS    10    /* bus error */
  63. #define    SIGSEG    11    /* segmentation violation */
  64. #define    SIGSYS    12    /* bad system call */
  65. #define    SIGPIPE    13    /* end of pipe */
  66. #define    SIGCLK    14    /* alarm clock */
  67. #define    SIGTRM    15    /* Catchable termination */
  68.  
  69. /*
  70.  * fundamental constants of the implementation--
  71.  * cannot be changed easily
  72.  */
  73.  
  74. #define    NBPW    sizeof(int)    /* number of bytes in an integer */
  75. #define    BSIZE    512        /* size of secondary block (bytes) */
  76. /* BSLOP can be 0 unless you have a TIU/Spider */
  77. #define    BSLOP    2        /* In case some device needs bigger buffers */
  78. #define    NINDIR    (BSIZE/sizeof(daddr_t))
  79. #define    BMASK    0777        /* BSIZE-1 */
  80. #define    BSHIFT    9        /* LOG2(BSIZE) */
  81. #define    NMASK    0177        /* NINDIR-1 */
  82. #define    NSHIFT    7        /* LOG2(NINDIR) */
  83. #define    USIZE    16        /* size of user block (*64) */
  84. #define    UBASE    0140000        /* abs. addr of user block */
  85. #define    NULL    0
  86. #define    CMASK    0        /* default mask for file creation */
  87. #define    NODEV    (dev_t)(-1)
  88. #define    ROOTINO    ((ino_t)2)    /* i number of all roots */
  89. #define    SUPERB    ((daddr_t)1)    /* block number of the super block */
  90. #define    DIRSIZ    14        /* max characters per directory */
  91. #define    NICINOD    100        /* number of superblock inodes */
  92. #define    NICFREE    50        /* number of superblock free blocks */
  93. #define    INFSIZE    138        /* size of per-proc info for users */
  94. #define    CBSIZE    6        /* number of chars in a clist block */
  95. #define    CROUND    07        /* clist rounding: sizeof(int *) + CBSIZE - 1*/
  96.  
  97. /*
  98.  * Some macros for units conversion
  99.  */
  100. /* Core clicks (64 bytes) to segments and vice versa */
  101. #define    ctos(x)    ((x+127)/128)
  102. #define stoc(x) ((x)*128)
  103.  
  104. /* Core clicks (64 bytes) to disk blocks */
  105. #define    ctod(x)    ((x+7)>>3)
  106.  
  107. /* inumber to disk address */
  108. #define    itod(x)    (daddr_t)((((unsigned)x+15)>>3))
  109.  
  110. /* inumber to disk offset */
  111. #define    itoo(x)    (int)((x+15)&07)
  112.  
  113. /* clicks to bytes */
  114. #define    ctob(x)    (x<<6)
  115.  
  116. /* bytes to clicks */
  117. #define    btoc(x)    ((((unsigned)x+63)>>6))
  118.  
  119. /* major part of a device */
  120. #define    major(x)    (int)(((unsigned)x>>8))
  121.  
  122. /* minor part of a device */
  123. #define    minor(x)    (int)(x&0377)
  124.  
  125. /* make a device number */
  126. #define    makedev(x,y)    (dev_t)((x)<<8 | (y))
  127.  
  128. typedef    struct { int r[1]; } *    physadr;
  129. typedef    long        daddr_t;
  130. typedef char *        caddr_t;
  131. typedef    unsigned int    ino_t;
  132. typedef    long        time_t;
  133. typedef    int        label_t[6];    /* regs 2-7 */
  134. typedef    int        dev_t;
  135. typedef    long        off_t;
  136.  
  137. /*
  138.  * Machine-dependent bits and macros
  139.  */
  140. #define    UMODE    0170000        /* usermode bits */
  141. #define    USERMODE(ps)    ((ps & UMODE)==UMODE)
  142.  
  143. #define    INTPRI    0340        /* Priority bits */
  144. #define    BASEPRI(ps)    ((ps & INTPRI) != 0)
  145.