   << INCLUDE file for declaration of RINS table for MPE IV >>          00010000
   <<  "RESOURCE IDENTIFICATION NUMBER"          >>                     00015000
                                                                        00020000
<<========================================================>>            00025000
<<                                                        >>            00030000
<<                   inclrins - xx                        >>            00035000
<<                                                        >>            00040000
<<========================================================>>            00045000
                                                                        00050000
                                                                        00055000
$if x8=on                                                               00060000
                                                                        00065000
comment:                                                                00070000
                                                                        00075000
             rin table general layout (initialized state)               00080000
             --------------------------------------------               00085000
  dst=%26      |-----------------------------------------------|--      00090000
               |           index of first free entry           | |      00095000
               |-----------------------------------------------| |      00100000
 --------------|            (# local+global rins)*2            | |      00105000
 |             |-----------------------------------------------| | first00110000
 |             | rt  |        index of next free               |<- free 00115000
 |             |-----------------------------------------------|-- entry00120000
 |             |                       0                       |  |     00125000
 |             |-----------------------------------------------<--      00130000
 |             | rt  |        index of next free               |--      00135000
 |             |-----------------------------------------------| |      00140000
 | rt=rin type |                       0                       | |      00145000
 |  (when      |-----------------------------------------------| |      00150000
 |  allowed)   | rt  |        index of next free               |<-      00155000
 |             |-----------------------------------------------|--      00160000
 |             |                       0                       | |      00165000
 | 1-local rin |-----------------------------------------------|<-      00170000
 | 2-global    | rt  |        index of next free               |--      00175000
 |   rin       |-----------------------------------------------| |      00180000
 | 3-file rin  |                       0                       |<-      00185000
 |             |-----------------------------------------------|        00190000
 |             | rt  |        index of next free               |--      00195000
 |             |-----------------------------------------------| |      00200000
 |             |                       0                       | |      00205000
 |             |-----------------------------------------------| |      00210000
 |             |                                               | |      00215000
 |             ~                                               ~ | .    00220000
 |             ~                                               ~ | .    00225000
 |             |                                               | |      00230000
 |             |-----------------------------------------------| | last 00235000
 |             | rt  |              0(eol)                     |<- free 00240000
 |             |-----------------------------------------------|   entry00245000
 |             |                       0                       |        00250000
 |             |-----------------------------------------------|        00255000
 ------------->|               free list pointer               |--      00260000
 secondary     |-----------------------------------------------| |      00265000
 table of 12-  |               total #of entries               | |      00270000
 word entries  |-----------------------------------------------| |      00275000
 for global    |              number free entries              | |      00280000
rin's only     |-----------------------------------------------| |      00285000
               |                   reserved                    | |      00290000
   ------------|-----------------------------------------------| |      00295000
        |      |if free, ptt to next free|                     |0<      00300000
        |      |-------------------------|                     |1       00305000
        |      ~                                               ~        00310000
     length=                                                            00315000
   # allocated                                                          00320000
   global rins                                                          00325000
       *12     ~                                               ~        00330000
        |      |                                               |10      00335000
        |      |                                               |11      00340000
   ------------|-----------------------------------------------|        00345000
                                                                        00350000
                 allocation and locking of local rins                   00355000
                 ------------------------------------                   00360000
                                                                        00365000
                                                                        00370000
                                                                        00375000
                                                                        00380000
                                                      dst22(10)=26(8)   00385000
                              rin table                                 00390000
          |-----------------------------------------------|             00395000
          |           index of first free entry           |             00400000
          |-----------------------------------------------|             00405000
          |        (number of local+global rins)*2        |             00410000
          |-----------------------------------------------|             00415000
          |                                               |             00420000
          |                                               |             00425000
          |                                               |             00430000
          |                                               |             00435000
          |                                               |             00440000
          |                                               |             00445000
job infor-|-----------------------------------------------|  local      00450000
  mation  | 0  1|         index of next rin               |--  rin #1   00455000
  table   |-----------------------------------------------| |(unlocked) 00460000
  -----   |                                               | |           00465000
  (jit)   |                                               | |           00470000
|------|  |                                               | |           00475000
|      |  |                                               | |           00480000
|      |  |                                               | |           00485000
|      |43|                                               | |           00490000
|------|  |-----------------------------------------------|<-  local    00495000
| lock |->| 0  1|         index of next rin               |--rin #2     00500000
|  rin |  |-----------------------------------------------| |(unlocked) 00505000
|index |  |                       |                       | |           00510000
|------|  |-----------------------------------------------| |           00515000
          |                                               | |           00520000
          |                                               | |           00525000
          |                                               | |           00530000
          |                                               | |           00535000
          |                                               | |           00540000
          |-----------------------------------------------|<-  local    00545000
          | 0  1|               0 end of list             |  rin #3     00550000
          ||-----------------------------------------------|  (last)   00555000
          | head of waiting list  |     pin of holder (p) | (locked)    00560000
          |-----------------------------------------------|             00565000
          |       |                          |            |             00570000
          |       |                          |            |             00575000
           --------                  --------|            |             00580000
           |                         |                                  00585000
           |                         |                                  00590000
           v                         v                                  00595000
          pcb#  waiting processes   pcb#  pcb# of process               00600000
                linked through            that "holds" rin              00605000
                pcb impeded queue                                       00610000
                (pcb#  pointers)                                        00615000
p = pin#                                                                00620000
                                                                        00625000
                                                                        00630000
                 allocation and locking of file rins                    00635000
                 -----------------------------------                    00640000
                                                                        00645000
                                                                        00650000
                                                                        00655000
                                                                        00660000
                                                      dst22(10)=26(8)   00665000
                              rin table                                 00670000
          |-----------------------------------------------|             00675000
          |           index of first free entry           |             00680000
          |-----------------------------------------------|             00685000
          |        (number of local+global rins)*2        |             00690000
          |-----------------------------------------------|             00695000
          |                                               |             00700000
          |                                               |             00705000
          |                                               |             00710000
          |                                               |             00715000
          |                                               |             00720000
          |                                               |             00725000
          |                                               |             00730000
          |                                               |             00735000
          |                                               |             00740000
          |-----------------------------------------------|             00745000
          | 1  1|/////////////////////////////////////////|             00750000
          |-----------------------------------------------|             00755000
          |head of waiting list(p)|     pin of holder     |             00760000
          |-----------------------------------------------|             00765000
          |       |                        |              |             00770000
          |       |                        |              |             00775000
           --------                 -------                             00780000
           |                        |                                   00785000
           v                        v                                   00790000
           pcb# waiting processes   pcb#  process that                  00795000
                linked through pcb       "holds" rin                    00800000
                impeded queue                                           00805000
                                                                        00810000
           p=pin#                                                       00815000
                                                                        00820000
                                                                        00825000
                                                                        00830000
                                                                        00835000
                                                                        00840000
                                                                        00845000
                                                                        00850000
                allocation and locking of global rins                   00855000
                -------------------------------------                   00860000
                                                                        00865000
                                                                        00870000
                                                                        00875000
                                                                        00880000
                                                                        00885000
                                                      dst22(10)=26(8)   00890000
                              rin table                                 00895000
          |-----------------------------------------------|             00900000
          |           index of first free entry           |             00905000
          |-----------------------------------------------|             00910000
          |        (number of local+global rins)*2        |             00915000
          |-----------------------------------------------|             00920000
          |                                               |             00925000
          |                                               |             00930000
          |                                               |             00935000
          |                                               |             00940000
          |-----------------------------------------------|             00945000
          |  1 0|    index of password, username          |-----------  00950000
          |-----------------------------------------------|          |  00955000
          |head of waiting list(p)|     pin of holder     |          |  00960000
          |-----------------------------------------------|          |  00965000
          |            |                     |            |          |  00970000
          |            |                     |            |          |  00975000
          |            |                     |            |          |  00980000
          |            |                     |            |          |  00985000
  pcb#  <-|-------------                     -------------|->pcb#    |  00990000
          |                                               |          |  00995000
 waiting  |                                               |  process |  01000000
processes |                                               |   that   |  01005000
          ~                                               ~  'holds' |  01010000
          ~                                               ~   rin    |  01015000
          |                                               |          |  01020000
          |                                               |          |  01025000
          |-----------------------------------------------|          |  01030000
          |                                               |<----------  01035000
          |                                               |             01040000
          |                 rin password                  |             01045000
          |                                               |             01050000
          |                                               |             01055000
          |-----------------------------------------------|             01060000
          |                                               |             01065000
          |                   username                    |             01070000
          |            (user name and account)            |             01075000
          |                                               |             01080000
          |-----------------------------------------------|             01085000
                                                                        01090000
           p=pin#                                                       01095000
                                                                        01100000
                                                                        01105000
                                                                        01110000
                                                                        01115000
;                                                                       01120000
$if                                                                     01125000
<< any change to the rin table will impact   >>                         01130000
<< the following modules:                    >>                         01135000
<< % 73,60,64                                >>                         01140000
<< global array declarations for the rin table  >>                      01145000
                                                                        01150000
integer array rin(*) = db+0;                                            01155000
integer array rin'e(*) = rin;                                           01160000
                                                                        01165000
                                                                        01170000
equate rin'dst         = %26,                                           01175000
       rin'sir         = 38;                                            01180000
                                                                        01185000
                                                                        01190000
equate rinentry        = 0,                                             01195000
       locklist        = rinentry + 1;                                  01200000
                                                                        01205000
equate rin'length      = locklist + 1;                                  01210000
                                                                        01215000
                                                                        01220000
<<secondary table definitions>>                                         01225000
                                                                        01230000
equate freeptr         = 0,                                             01235000
       totalentries    = freeptr + 1,                                   01240000
       numfreeentries  = totalentries + 1;                              01245000
                                                                        01250000
equate passwordf       = 0,                                             01255000
       passwordln      = 4,                                             01260000
       usernamef       = passwordf + passwordln,                        01265000
       usernmln        = 8;                                             01270000
                                                                        01275000
equate rin'passuserln  = passwordln + usernmln;                         01280000
                                                                        01285000
                                                                        01290000
<<         db relative declarations                      >>             01295000
<< to use the rin table via exchangedb, you must declare >>             01300000
<< a db relative array rin as follows:                   >>             01305000
<<       integer array rin(*) = db+0;                    >>             01310000
<<       integer array rin'e(*) = rin;                   >>             01315000
<< rinptr is an index for rin table entries.  it is      >>             01320000
<< declared as an integer in the process.                >>             01325000
<< the index for the array must also be declared.  the   >>             01330000
<< index for the array is rin'passuserinx.               >>             01335000
                                                                        01340000
                                                                        01345000
define rin'firstfree  = rin(0)#,                                        01350000
       rin'totalnum   = rin(1)#;                                        01355000
                                                                        01360000
define rin'e'type     = rin'e(rinptr+rinentry).(0:2)#,                  01365000
       rin'e'index    = rin'e(rinptr+rinentry).(2:14)#,                 01370000
       rin'e'headq    = rin'e(rinptr+locklist).(0:8)#,                  01375000
       rin'e'holder   = rin'e(rinptr+locklist).(8:8)#;                  01380000
                                                                        01385000
define rin'freeptr    = rin(rin'totalnum+freeptr)#,                     01390000
       rin'totentries = rin(rin'totalnum+totalentries)#,                01395000
       rin'freentries = rin(rin'totalnum+numfreeentries)#;              01400000
                                                                        01405000
define rin'e'password = rin'e(rin'e'index+passwordf+                    01410000
                                rin'passuserinx)#,                      01415000
       rin'e'username = rin'e(rin'e'index+usernamef+                    01420000
                                rin'passuserinx)#,                      01425000
       rin'e'nextfree = rin'e(rin'freeptr)#,                            01430000
       rin'e'link     = rin'e(rin'e'index)#;                            01435000
