home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 202.img / SCO386N2.TD0 / usr / include / sys / space.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-07-13  |  4.9 KB  |  307 lines

  1. /*
  2.  *    @(#) space.h 2.6 88/07/13 
  3.  *
  4.  *    Copyright (C) The Santa Cruz Operation, 1984, 1985, 1986, 1987, 1988.
  5.  *    Copyright (C) Microsoft Corporation, 1984, 1985, 1986, 1987, 1988.
  6.  *    This Module contains Proprietary Information of
  7.  *    The Santa Cruz Operation, Microsoft Corporation
  8.  *    and AT&T, and should be treated as Confidential.
  9.  */
  10.  
  11. /*
  12.  * THIS FILE CONTAINS CODE WHICH IS SPECIFIC TO THE
  13.  * INTEL CPU'S AND MAY REQUIRE MODIFICATION
  14.  * WHEN ADAPTING XENIX TO NEW HARDWARE.
  15.  */
  16.  
  17. #ifdef M_I386
  18. #include  "page.h"
  19. #include  "init.h"
  20. #endif
  21.  
  22. #include  "seg.h"
  23. #include  "buf.h"
  24. #include  "proc.h"
  25. #ifndef M_I386
  26. #include  "text.h"
  27. #endif
  28. #include  "signal.h"
  29. #include  "mmu.h"
  30. #include  "file.h"
  31. #include  "inode.h"
  32. #include  "namei.h"
  33. #include  "map.h"
  34. #include  "callo.h"
  35. #include  "mount.h"
  36. #include  "var.h"
  37. #include  "systm.h"
  38. #include  "utsname.h"
  39.  
  40. #include  "locking.h"
  41. #include  "ipc.h"
  42. #include  "sd.h"
  43. #include  "msg.h"
  44. #include  "sem.h"
  45. #include  "emap.h"
  46. #include  "nmap.h"
  47. #include  "sxt.h"
  48. #include  "dio.h"
  49. #include  "disk.h"
  50.  
  51. #ifdef M_I386
  52. #include  "stream.h"
  53. #include  "event.h"
  54. #endif
  55.  
  56. int Timezone=TIMEZONE;
  57. int Dstflag=DSTFLAG;
  58. int Cmask=CMASK;
  59. int dma_single=DMAEXCL;
  60.  
  61. #ifdef M_I386
  62. int memlim=MEMLIM;
  63. int swplim=SWPLIM;
  64. #endif
  65.  
  66. #ifndef M_I386
  67.  
  68. char sabuf[NSABUF][BSIZE];
  69.  
  70. #if NBUF==0
  71. struct buf buf[MAXBUF];
  72. #else
  73. struct buf buf[NBUF+NSABUF];
  74. #endif
  75.  
  76. #endif
  77.  
  78. #ifdef M_I386
  79. struct    pfree    pfreelist;    /* Head of physio header pool */
  80. struct    buf    pbuf[NPBUF];    /* Physical io header pool */
  81. struct  pgstat  pgstat;
  82. #endif
  83.  
  84. struct hbuf hbuf[NHBUF];    /* buffer hash table */
  85.  
  86. #ifdef M_I386
  87. struct file file[NFILE];
  88. struct inode inode[NINODE];
  89. struct namecache namecache[NINODE];
  90. short i_txtcnt[NINODE];
  91. #else
  92. struct file  far file[NFILE];
  93. struct inode far inode[NINODE];
  94. struct namecache far namecache[NINODE];
  95. #endif
  96.  
  97. struct locklist locklist[NFLOCKS];
  98.  
  99. struct sd sdtab[NSDSEGS * NSDSLOTS];
  100. struct shmid_ent shmid_tab[NSDSEGS];
  101. int    shmid_pos;
  102. struct proc proc[NPROC];
  103. #ifndef M_I386
  104. struct text text[NTEXT];
  105. #endif
  106.  
  107. #ifdef M_I386
  108. struct mapent sptent[100];
  109. struct map    sptmap = {0, 100, sptent};
  110. #else
  111. struct mapent coreent[CMAPSIZ];
  112. struct map    coremap = {0, CMAPSIZ, coreent};
  113. struct mapent swapent[SMAPSIZ];
  114. struct map    swapmap = {0, SMAPSIZ, swapent};
  115. #endif
  116.  
  117. struct callo callout[NCALL];
  118. struct cblock cfree[NCLIST];
  119. struct mount mount[NMOUNT];
  120. struct emap emap[NEMAP];
  121. struct nmap nmap[NEMAP];
  122. struct Link sxtlink[NSXT];
  123. struct diskinfo diskinfo[NDISK];
  124.  
  125. int Hz=HZ;
  126.  
  127. /* uts node name */
  128. char node[SYS_NMLN] = NODE;
  129.  
  130. /* message facility */
  131. struct    mapent        msgent[MSGMAP];
  132. struct    map        msgmap = {0, MSGMAP, msgent};
  133. struct  msqid_ds    msgque[MSGMNI];
  134. struct    msg        msgh[MSGTQL];
  135. struct    msginfo        msginfo = 
  136. {
  137.     MSGMAP,
  138.     MSGMAX,
  139.     MSGMNB,
  140.     MSGMNI,
  141.     MSGSSZ,
  142.     MSGTQL,
  143.     MSGSEG
  144. };
  145.  
  146. /* System V semaphore facility */
  147. struct    semid_ds    sema[SEMMNI];
  148. struct    sem        sem[SEMMNS];
  149. struct    mapent        sement[SEMMAP];
  150. struct    map        semmap = {0, SEMMAP, sement};
  151. struct    sem_undo    *sem_undo[NPROC];
  152. #define SEMUSZ    (sizeof(struct sem_undo) + sizeof(struct undo) * SEMUME)
  153. int    semu[((SEMUSZ * SEMMNU) + NBPW - 1) / NBPW];
  154. union    
  155. {
  156.     ushort        semvals[SEMMSL];
  157.     struct        semid_ds    ds;
  158.     struct        sembuf        semops[SEMOPM];
  159. }    semtmp;
  160. struct    seminfo        seminfo =
  161. {
  162.     SEMMAP,
  163.     SEMMNI,
  164.     SEMMNS,
  165.     SEMMNU,
  166.     SEMMSL,
  167.     SEMOPM,
  168.     SEMUME,
  169.     SEMUSZ,
  170.     SEMVMX,
  171.     SEMAEM,
  172. };
  173.  
  174. #ifdef M_I386
  175. struct  shminfo        shminfo386 =
  176. {
  177.     SHMMAX,
  178.     SHMMIN,
  179.     SHMMNI,
  180.     SHMSEG,
  181.     SHMBRK,
  182.     SHMALL
  183. };
  184.  
  185. struct  shminfo        shminfo286 =
  186. {
  187.     0x10000,
  188.     1,
  189.     SHMMNI,
  190.     SHMSEG,
  191.     SHMBRK,
  192.     SHMALL
  193. };
  194. #endif
  195.  
  196. struct var v=
  197. {
  198.     NBUF,
  199.     NSABUF,
  200.     NHBUF,
  201.     NHBUF-1,
  202.     MAXBUF,
  203.     NCALL,
  204.     NINODE,
  205.     &inode[NINODE],
  206.     NFILE,
  207.     &file[NFILE],
  208.     NMOUNT,
  209.     &mount[NMOUNT],
  210.     NPROC,
  211.     &proc[NPROC],
  212. #ifndef M_I386
  213.     NTEXT,
  214.     &text[NTEXT],
  215. #endif
  216.     NCLIST,
  217.     MAXUPRC,
  218.     MAXMEM,
  219.     NFLOCKS,
  220.     NSDSEGS,
  221.     NSDSLOTS,
  222.     MSGMAP,
  223.     MSGMAX,
  224.     MSGMNB,
  225.     MSGMNI,
  226.     MSGTQL,
  227.     MSGSSZ,
  228.     MSGSEG,
  229.     SEMMAP,
  230.     SEMMNI,
  231.     SEMMNU,
  232.     SEMMSL,
  233.     SEMOPM,
  234.     SEMUME,
  235.     SEMVMX,
  236.     SEMAEM,
  237.     SEMMNS,
  238.     SEMUSZ,
  239.     NSCRN,
  240.     NPBUF,
  241.     NEMAP,
  242.     NSXT,
  243. #ifdef  M_I386
  244.     SHMMAX,
  245.     SHMMIN,
  246.     SHMMNI,
  247.     SHMSEG,
  248.     SHMBRK,
  249.     SHMALL,
  250.     NSDSEGS*NSDSLOTS,
  251. #else    /* not yet for 286 */
  252.     0,
  253.     0,
  254.     0,
  255.     0,
  256.     0,
  257.     0,
  258.     0,
  259. #endif
  260.     NQUEUE,
  261.     NSTREAM,
  262.     NBLK8192,
  263.     NBLK4096,
  264.     NBLK2048,
  265.     NBLK1024,
  266.     NBLK512,
  267.     NBLK256,
  268.     NBLK128,
  269.     NBLK64,
  270.     NBLK32,
  271.     NBLK16,
  272.     NBLK4,
  273.     NDISK,
  274.     EVQUEUES,
  275.     EVDEVS,
  276.     EVDEVSPERQ,
  277.     SCRNMEM,
  278.     KBTYPE,
  279. };
  280.  
  281. #ifdef M_I386
  282. /* Streams Data Structures and tuneable variables */
  283. struct queue queue[NQUEUE];
  284. struct stdata streams[NSTREAM];
  285. mblk_t mblock[NMBLOCK];
  286. dblk_t dblock[NDBLOCK];
  287. struct linkblk linkblk[NMUXLINK];
  288. struct strevent strevent[NSTREVENT];
  289. int nmblock = NMBLOCK;
  290. int nmuxlink = NMUXLINK;
  291. int nstrpush = NSTRPUSH;
  292. int nstrevent = NSTREVENT;
  293. int maxsepgcnt = MAXSEPGCNT;
  294. int strmsgsz = STRMSGSZ;
  295. int strctlsz = STRCTLSZ;
  296. char strlofrac = STRLOFRAC;
  297. char strmedfrac = STRMEDFRAC;
  298. #endif /* M_I386 */
  299.  
  300. /* Event driver/line discipline data structures */
  301. struct evldchan evldchan[EVDEVS];
  302. struct evdev    evdevice[EVDEVS];
  303. struct evchan    evchannel[EVQUEUES];
  304.  
  305. char    evdindextab[EVQUEUES * EVDEVSPERQ];
  306. char    *evdindex[EVQUEUES];
  307.