User Tools

Site Tools


cdc:nos2.source:nam5871:nvfvrvf

NVFVRVF

Table Of Contents

  • [00006] PROC NVFVRVF(SWTESS)
  • [00007] NVFVRVF - READ VCB (VALIDATION CONTROL BLOCK) FILE.
  • [00011] READ VCB FILE.
  • [00051] PROC ABORT
  • [00052] PROC MESSAGE
  • [00053] PROC MOVE
  • [00054] PROC NVFVDCD
  • [00055] PROC READLS
  • [00056] PROC SSTATS
  • [00057] PROC SSTRQE
  • [00058] PROC XSST

Source Code

NVFVRVF.txt
  1. *DECK NVFVRVF
  2. USETEXT TEXTNVF
  3. USETEXT TEXTSS
  4. USETEXT TXVCBNV
  5.  
  6. PROC NVFVRVF(SWTESS);
  7. # TITLE NVFVRVF - READ VCB (VALIDATION CONTROL BLOCK) FILE. #
  8.  
  9. BEGIN # NVFVRVF #
  10. #
  11. ** NVFVRVF - READ VCB FILE.
  12. *
  13. * A. LIM. 81/11/02.
  14. *
  15. * THIS PROCEDURE READS THE VCB FILE UPON REQUEST.
  16. *
  17. * PROC NVFVRVF(SWTESS)
  18. *
  19. * ENTRY THE VCB-READ-REQUEST-QUEUE (VRQ) CONTAINS ONE OR MORE
  20. * VCB-READ-REQUEST(S). DURING INITIALIZATION, WHEN
  21. * PROC IS FIRST CALLED, THE VRQ IS EMPTY.
  22. * THE ACTIVE-VCB-READ-REQUEST-TABLE (AVRT) AND THE
  23. * READLIST ARE EMPTY.
  24. *
  25. * EXIT ENTRIES ARE MADE IN AVRT, AND AVRT IS SORTED INTO
  26. * ASCENDING ORDER BY THE ENTIRE ENTRY.
  27. * NON-DUPLICATED PRUS ARE COPIED FROM AVRT TO READLIST.
  28. * ITEM *AVCOUNT* REFLECTS THE ACTUAL NUMBER OF ENTRIES
  29. * IN AVRT, WHILE ITEM *RLCOUNT* REFLECTS THE NUMBER
  30. * OF PRUS BEING READ BY THE CURRENT READLS FUNCTION.
  31. * FORMAL ARRAY SWTESS IS SET SO THAT PROC *NVFVDCD* IS
  32. * IS CALLED WHEN THE VCB FET COMPLETE BIT IS SET OR
  33. * THE *IN* POINTER CHANGES.
  34. * FOR THE INITIALIZATION CALL, FORMAL ARRAY SWTESS IS
  35. * SET SUCH THAT THIS PROC WILL AGAIN BE CALLED WHEN
  36. * AN ENTRY IS MADE IN THE VRQ.
  37. #
  38.  
  39. # SWTESS - STATUS WORKLIST MONITOR ARRAY. #
  40. *CALL SWTESS
  41.  
  42.  
  43.  
  44.  
  45.  
  46. #
  47. **** PROC NVFVRVF - XREF LIST BEGIN.
  48. #
  49. XREF
  50. BEGIN
  51. PROC ABORT; # MACREL - ABORT TASK #
  52. PROC MESSAGE; # MACREL - SEND MESSAGE #
  53. PROC MOVE; # MACREL - MOVE CM WORDS #
  54. PROC NVFVDCD; # NVF - DISPATCH CIO DATA #
  55. PROC READLS; # MACREL - ISSUE CIO READLS FUNCTION #
  56. PROC SSTATS; # SS - ALLOCATE TABLE SPACE #
  57. PROC SSTRQE; # SS - REMOVE QUEUE ENTRY #
  58. PROC XSST; # MACREL - SHELL SORT TABLE INTO ASCENDING#
  59. END
  60. #
  61. ****
  62. #
  63.  
  64.  
  65.  
  66. ITEM CURREQ I; # CURRENT VCB REQUEST #
  67. ITEM I,J,L I; # INDUCTION VARIABLES #
  68. ITEM K I; # INDEX IN VWT #
  69.  
  70.  
  71. #
  72. * DAYFILE MESSAGE ARRAY.
  73. #
  74.  
  75. ARRAY VBMSG[00:00] S(3);
  76. BEGIN
  77. ITEM VM$MSG C(00,00,23) = ["DUPLICATED VCB REQUEST."];
  78. ITEM VM$ZERO U(02,18,42) = [0];
  79. END
  80.  
  81. CONTROL EJECT;
  82.  
  83. P<TVRQ> = LOC(ABHBUF); # PLACE TEMPLATE ON WORD ONE OF VRQ ENTRY #
  84. AVCOUNT = 0; # INIT COUNT OF ENTRIES IN AVRT #
  85. RLCOUNT = 0; # INIT COUNT OF PRUS TO BE READ #
  86.  
  87. #
  88. * BUILD AVRT FROM VRQ
  89. #
  90.  
  91. FOR I = 0 STEP 1 WHILE VRQLNGTH NQ 0
  92. AND AVCOUNT LS RLMAX$
  93. DO # LOOP UNTIL VRQ EMPTY OR AVRT FULL #
  94. BEGIN # FOR I LOOP #
  95. SSTRQE(P<VRQ>,WCBUF,ABHBUF,MSGBUF); # REMOVE 1 ENTRY FROM VRQ #
  96. IF TVR$TYPE[0] EQ RDWRITE$
  97. THEN
  98. BEGIN # READ FOR A WRITE #
  99. K = VWTLNGTH/VBESIZ$; # CALCU INDEX TO INSERT ENTRY TO VWT #
  100. SSTATS(P<VWT>, VBESIZ$); # ALLOC SPACE AT END OF VWT #
  101. MOVE(VBESIZ$, MSGBUF, VWT[K]); # MOVE ENTRY TO VWT #
  102. END
  103. AVR$ORD[AVCOUNT] = TVR$ORD[0]; # MAKE ENTRY IN AVRT #
  104. AVR$TYPE[AVCOUNT] = TVR$TYPE[0];
  105. AVR$QADDR[AVCOUNT] = TVR$QADDR[0];
  106. AVCOUNT = AVCOUNT + 1;
  107. END # FOR I LOOP #
  108.  
  109. #
  110. * SORT AVRT.
  111. #
  112.  
  113. IF AVCOUNT NQ 0
  114. THEN
  115. BEGIN # AVRT NOT EMPTY- AT LEAST ONE ENTRY #
  116. XSST(AVRT, AVCOUNT); # SHELL SORT IT #
  117.  
  118. $BEGIN
  119. #
  120. * CHECK AVRT FOR TWO ADJACENT DUPLICATED REQUESTS. ISSUE DAYFILE
  121. * MESSAGE AND ABORT NVF.
  122. #
  123.  
  124. CURREQ = AVR$REQ[0]; # SET CURRENT REQUEST TO 1ST REQ IN AVRT #
  125. FOR L = 1 STEP 1 UNTIL AVCOUNT - 1
  126. DO
  127. BEGIN # FOR L LOOP #
  128. IF AVR$REQ[L] EQ CURREQ
  129. THEN
  130. BEGIN
  131. MESSAGE(VBMSG[0],DFILE$); # SEND MESSAGE TO SYSTEM DAYFILE#
  132. ABORT; # AND ABORT NVF #
  133. END
  134. ELSE
  135. BEGIN
  136. CURREQ = AVR$REQ[L];
  137. END
  138. END # FOR L LOOP #
  139.  
  140. $END
  141.  
  142. #
  143. * AVRT LOOKS GOOD. PREPARE READLS FUNCTION BY PUTTING
  144. * NON-DUPLICATED RELATIVE PRU-ADDRESS FROM AVRT TO READLIST, AND
  145. * THEN ISSUE THE READLS.
  146. #
  147.  
  148. RL$RPA[RLCOUNT] = AVR$RPA[0] + 1; # MAKE 1ST ENTRY IN READLIST #
  149. FOR J = 1 STEP 1 UNTIL AVCOUNT - 1
  150. DO
  151. BEGIN # FOR J LOOP #
  152. IF AVR$RPA[J] + 1 NQ RL$RPA[RLCOUNT]
  153. THEN
  154. BEGIN # NON-DUPLICATED PRU #
  155. RLCOUNT = RLCOUNT + 1;
  156. RL$RPA[RLCOUNT] = AVR$RPA[J] + 1; # MAKE ENTRY IN READLIST#
  157. END
  158. END # FOR J LOOP #
  159. RLCOUNT = RLCOUNT + 1; # ACTUAL NO OF ENTRIES IN READLIST #
  160. RL$RPA[RLCOUNT] = 0; # MAKE THE TERMINATOR WORD #
  161. VB$LA[0] = LOC(READLIST); # STORE READLIST ADDR IN FET #
  162. READLS(VCBFET); # ISSUE READLS FUNCTION #
  163.  
  164. # SET UP FORMAL RETURN PARAMETER ARRAY SWTESS. #
  165.  
  166. STE$ADDR1[0] = LOC(VCBFET); # WATCH COMP BIT IN FET+0 #
  167. STE$ADDR2[0] = LOC(VB$IN[0]); # WATCH FET *IN* POINTER #
  168. STE$RTN[0] = LOC(NVFVDCD); # RTN TO DISPATCH CIO DATA #
  169. STE$INIT1[0] = VB$WORD[0]; # SET UP INIT VALUE OF FET+0 #
  170. STE$CBIT1[0] = FALSE; # CALL NVFVDCD WHEN C-BIT SET#
  171. STE$INIT2[0] = VB$OUT[0]; # OR WHEN *IN* NQ *OUT* #
  172. END
  173. ELSE
  174. BEGIN # THIS IS INITIALIZATION CALL#
  175. INVVRVF = 0; # INSURE INTERRUPT CEL IS CLR#
  176. STE$ADDR1[0] = LOC(INVVRVF); # WATCH INTERRUPT CELL #
  177. STE$ADDR2[0] = 0; # AND WATCH ONE CELL ONLY #
  178. STE$RTN[0] = LOC(NVFVRVF); # RECALL THIS PROC #
  179. STE$INIT1[0] = 0; # WHEN VRQ NON-EMPTY #
  180. STE$INIT2[0] = 0;
  181. END
  182.  
  183. END # NVFVRVF #
  184.  
  185. TERM
cdc/nos2.source/nam5871/nvfvrvf.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator