home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / UNIX3862.ZIP / U386-06.ZIP / U386-6.TD0 / usr / include / sys / param.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-06-26  |  3.7 KB  |  128 lines

  1. /*    Copyright (c) 1984, 1986, 1987, 1988 AT&T    */
  2. /*      All Rights Reserved      */
  3.  
  4. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T    */
  5. /*    The copyright notice above does not evidence any       */
  6. /*    actual or intended publication of such source code.    */
  7.  
  8. /*    Copyright (c) 1987, 1988 Microsoft Corporation    */
  9. /*      All Rights Reserved    */
  10.  
  11. /*    This Module contains Proprietary Information of Microsoft  */
  12. /*    Corporation and should be treated as Confidential.       */
  13.  
  14. #ident    "@(#)head.sys:param.h    1.3.1.3"
  15.  
  16. /*
  17.  * fundamental variables
  18.  * don't change too often
  19.  */
  20. #include "sys/fs/s5param.h"
  21.  
  22. #define    MAXPID    30000        /* max process id */
  23. #define    MAXUID    60000        /* max user id */
  24. #define    MAXLINK    1000        /* max links */
  25.  
  26. #define    SSIZE    1        /* initial stack size (*4096 bytes) */
  27. #define    SINCR    1        /* increment of stack (*4096 bytes) */
  28. #define    USIZE    MINUSIZE    /* initial size of user block (*4096 bytes) */
  29. #define    MINUSIZE  2        /* min size of user block (*4096 bytes) */
  30. #define    MAXUSIZE 18        /* max size of user block (*4096 bytes) */
  31.  
  32. #define    CANBSIZ    256        /* max size of typewriter line    */
  33. #define    HZ    100        /* 100 ticks/second of the clock */
  34.  
  35. #define    NCARGS    5120        /* # characters in exec arglist */
  36.                 /*   must be multiple of NBPW.  */
  37.  
  38. /*    The following define is here for temporary compatibility
  39. **    and should be removed in the next release.  It gives a
  40. **    value for the maximum number of open files per process.
  41. **    However, this value is no longer a constant.  It is a
  42. **    configurable parameter, NOFILES, specified in the kernel
  43. **    master file and available in v.v_nofiles.  Programs which
  44. **    include this header file and use the following value may
  45. **    not operate correctly if the system has been configured
  46. **    to a different value.
  47. */
  48.  
  49. #define    NOFILE    60
  50.  
  51. /*    The following represent the minimum and maximum values to
  52. **    which the paramater NOFILES in the kernel master file may
  53. **    be set.
  54. */
  55.  
  56. #define    NOFILES_MIN     20
  57. #define    NOFILES_MAX    100
  58.  
  59. /*    The following defines apply to the kernel virtual
  60. **    address space.
  61. */
  62.  
  63. #define    SYSSEGSZ 1024    /* The size of the kernel segment    */
  64.             /* sysseg in pages.  The starting    */
  65.             /* address comes from the vuifile.    */
  66.  
  67. #define    MAXKSEG        127    /* max no of pages per kseg */
  68.  
  69. /*    To avoid prefetch errors at the end of a region, it must
  70. **    be padded with the following number of bytes.
  71. */
  72.  
  73. #define    PREFETCH    0
  74.  
  75. /*
  76.  * priorities
  77.  * should not be altered too much
  78.  */
  79.  
  80. #define    PMASK    0177
  81. #define    PCATCH    0400
  82. #define    PNOSTOP    01000
  83. #define    PSWP    0
  84. #define    PINOD    10
  85. #define    PRIBIO    20
  86. #define    PZERO    25
  87. #define PMEM    0
  88. #define    NZERO    20
  89. #define    PPIPE    26
  90. #define    PWAIT    30
  91. #define    PSLEP    39
  92. #define    PUSER    60
  93. #define    PIDLE    127
  94.  
  95. /*
  96.  * fundamental constants of the implementation--
  97.  * cannot be changed easily
  98.  */
  99.  
  100. #define    NBPW    sizeof(int)    /* number of bytes in an integer */
  101. #define    NCPPT    1024        /* Number of clicks per page table */
  102. #define    CPPTSHIFT    10    /* LOG2(NCPPT) if exact */
  103. #define    NBPC    4096        /* Number of bytes per click */
  104. #define    BPCSHIFT    12    /* LOG2(NBPC) if exact */
  105. #define    NULL    0
  106. #define    CMASK    0        /* default mask for file creation */
  107. #define    CDLIMIT    (1L<<14)    /* default max write address */
  108. #define    NODEV    (dev_t)(-1)
  109. #define NBPSCTR         512     /* Bytes per LOGICAL disk sector. */
  110. #define SCTRSHFT        9       /* Shift for BPSECT.            */
  111.  
  112. #define    UMODE    3        /* current Xlevel == user */
  113. #define    USERMODE(cs)    (((cs) & SEL_RPL) == UMODE)
  114.  
  115. #define    lobyte(X)    (((unsigned char *)&X)[0])
  116. #define    hibyte(X)    (((unsigned char *)&X)[1])
  117. #define    loword(X)    (((ushort *)&X)[0])
  118. #define    hiword(X)    (((ushort *)&X)[1])
  119.  
  120. #define    MAXSUSE    255
  121.  
  122. /* REMOTE -- whether machine is primary, secondary, or regular */
  123. #define SYSNAME 9        /* # chars in system name */
  124. #define PREMOTE 39
  125.  
  126. /* XENIX compatibility */
  127. #define    ktop(vaddr)    ((paddr_t)svirtophys(vaddr))
  128.