User Tools

Site Tools


cdc:nos2.source:nam5871:nvfcups

NVFCUPS

Table Of Contents

  • [00008] PROC NVFCUPS
  • [00009] NVFCUPS - UPDATE PID STATUS
  • [00013] UPDATE PID STATUS.
  • [00036] PROC NVFUMQE
  • [00057] PIDMSG - PID NHP LOG FILE MESSAGE ARRAY.
  • [00070] LLEPID - LOGICAL LINK ENTRY FROM PATHPID TABLE.

Source Code

NVFCUPS.txt
  1. *DECK NVFCUPS
  2. USETEXT TEXTNVF
  3. USETEXT TXSMNVF
  4. USETEXT TEXTSS
  5. USETEXT TXTANVF
  6. USETEXT TXTAPSS
  7. USETEXT TXTSUSS
  8. PROC NVFCUPS;
  9. # TITLE - NVFCUPS - UPDATE PID STATUS #
  10. BEGIN # NVFCUPS #
  11.  
  12. #
  13. ** NVFCUPS - UPDATE PID STATUS.
  14. *
  15. * C. BRION 83/04/21,83/10/19.
  16. *
  17. * THIS PROCEDURE IS RESPONSIBLE FOR PROCESSING THE LOGICAL LINK
  18. * STATUS SM FROM NIP. (CR/SLL/U SM ).
  19. *
  20. * PROC NVFCUPS
  21. *
  22. * ENTRY
  23. * CR/SLL/U SM IN MSGBUF.
  24. *
  25. * EXIT
  26. * 1) SETPIDA FUNCTION REQUEST MAY BE SENT TO THE CPMRQ.
  27. * 2) A HOP/LG SM MAY BE ISSUED TO REPORT PID STATUS CHANGE IN NHP LOGFILE.
  28. * 3) THE LLPID TABLE IS UPDATED.
  29. #
  30.  
  31. #
  32. **** PROC NVFCUPS XREF LIST.
  33. #
  34. XREF
  35. BEGIN
  36. PROC NVFUMQE; # MAKE QUEUE ENTRY #
  37. END
  38.  
  39. #
  40. ****
  41. #
  42.  
  43.  
  44. #
  45. * DEF, ITEM AND ARRAY DEFINITIONS.
  46. #
  47. DEF ACTIVE$ # 1 #; # ACTIVE LLINK STATUS #
  48. DEF INACTIVE$ # 0 #; # INACTIVE LLINK STATUS #
  49.  
  50. ITEM NUMLL I; # NUMBER OF LLINKS FOR A PID #
  51. ITEM PORD I; # LOCAL PID ENTRY RWD #
  52. ITEM SAVACLL I; # SAVED NUMBER ACTIVE LLINKS #
  53. ITEM LLORD I; # LOCAL PATH RWD #
  54.  
  55.  
  56. #
  57. ** PIDMSG - PID NHP LOG FILE MESSAGE ARRAY.
  58. #
  59. ARRAY PIDMSG [00:00] S(5);
  60. BEGIN
  61. ITEM PUM$PFCSFC U(00,00,16) = [HOPLG];
  62. ITEM PUM$MSG1 C(01,00,05) = ["PID: "];
  63. ITEM PUM$PID C(01,30,03);
  64. ITEM PUM$MSG2 C(01,48,02) = [", "];
  65. ITEM PUM$MSG3 C(02,00,10) = ["NHP PATH -"];
  66. ITEM PUM$MSG4 C(03,00,11) = ["UNAVAILABLE"];
  67. ITEM PUM$ZBYT U(04,06,54) = [0];
  68. END
  69. #
  70. ** LLEPID - LOGICAL LINK ENTRY FROM PATHPID TABLE.
  71. #
  72.  
  73. BASED ARRAY LLEPID [00:00] S(1);
  74. BEGIN
  75. ITEM LLE$WORD U(00,00,60); # WORD REFERENCE #
  76. ITEM LLE$DN U(00,00,08); # DESTINATION NODE OF LLINK #
  77. ITEM LLE$SN U(00,08,08); # SOURCE NODE OF LLINK #
  78. ITEM LLE$LLSTAT B(00,59,01); # LLINK STATUS #
  79. END
  80.  
  81.  
  82. CONTROL EJECT;
  83.  
  84. #
  85. * SEARCH THE LLPID TABLE FOR A MATCH ON LOGICAL LINK.
  86. * NOTE THAT TABLE ONLY SEARCHED IF LLPID TABLE EXISTS.
  87. #
  88. IF LLPIDL NQ 0
  89. THEN
  90. BEGIN
  91.  
  92. FOR PORD = 0 STEP ((LLP$LLCNT[PORD] * PIDLLSIZ$) + 1) WHILE
  93. PORD LS LLPIDL
  94. DO
  95. BEGIN
  96. NUMLL = LLP$LLCNT[PORD] * PIDLLSIZ$;
  97. SAVACLL = LLP$ACLL[PORD];
  98. FOR LLORD = 1 STEP PIDLLSIZ$ UNTIL NUMLL
  99. DO
  100. BEGIN
  101. P<LLEPID> = P<LLPID> + PORD + LLORD;
  102. #
  103. * CHECK IF LLINK ENTRY ACTIVE AND INCOMING STATUS INACTIVE.
  104. * IF SO, MARK LLINK ENTRY INACTIVE AND DECREMENT NUMBER OF
  105. * LLINKS ACTIVE FOR THIS PID ENTRY.
  106. #
  107. IF CRSLDN[0] EQ LLE$DN[0] AND
  108. CRSLSN[0] EQ LLE$SN[0]
  109. THEN
  110. BEGIN
  111. IF LLE$LLSTAT[0] AND CRSLST[0] EQ INACTIVE$
  112. THEN
  113. BEGIN
  114. LLE$LLSTAT[0] = FALSE;
  115. LLP$ACLL[PORD] = LLP$ACLL[PORD] - 1;
  116. END
  117. #
  118. * OTHERWISE CHECK IF LLINK ENTRY IS INACTIVE AND INCOMING
  119. * STATUS IS ACTIVE.
  120. * IF SO, SET LLINK ENTRY ACTIVE AND INCREMENT NUMBER OF
  121. * AVAILABLE LLINKS FOR THIS PID.
  122. #
  123. ELSE IF NOT LLE$LLSTAT[0] AND
  124. CRSLST[0] EQ ACTIVE$
  125. THEN
  126. BEGIN
  127. LLE$LLSTAT[0] = TRUE;
  128. LLP$ACLL[PORD] = LLP$ACLL[PORD] + 1;
  129. END
  130. END
  131. END
  132. #
  133. * ISSUE SETPIDA FUNCTION REQUEST TO THE CPMRQ.
  134. * THIS DONE BY SETTING THE PARAMETER BLOCK AND MAKING
  135. * QUEUE ENTRY FOR THE CPMRQ.
  136. * ALSO SET UP HOP/LG MESSAGE.
  137. #
  138. P<LPIDBUF> = LOC(MSGBUF[1]);
  139. LPI$WORD0[0] = 0;
  140. LPI$WORD1[0] = 0;
  141. LPI$FC[0] = SPIDAFC$;
  142. LPI$SIZE[0] = SPIDBUFS$;
  143. LPI$PID[0] = LLP$PNAME[PORD];
  144. PUM$PID[0] = LLP$PNAME[PORD];
  145. #
  146. * IF (NO LLINKS ACTIVE FOR PID PRIOR TO CURRENT STATUS SM AND
  147. * /AT LEAST 1 LLINK NOW ACTIVE) OR
  148. * (AT LEAST 1 LLINK ACTIVE PRIOR TO CURRENT STATUS SM AND
  149. * NO LLINKS NOW ACTIVE)
  150. *
  151. * ISSUE APPROPRIATE SETPIDA FUNCTION REQUEST TO CPMRQ
  152. #
  153. IF ((SAVACLL EQ 0 AND LLP$ACLL[PORD] NQ 0) OR
  154. (SAVACLL NQ 0 AND LLP$ACLL[PORD] EQ 0))
  155. THEN
  156. BEGIN
  157. IF SAVACLL EQ 0 AND LLP$ACLL[PORD] NQ 0
  158. THEN
  159. BEGIN
  160. #
  161. * AT LEAST 1 LLINK NOW ACTIVE MAKING PID AVAILABLE.
  162. * SET AVAILABLE STATUS IN FUNCTION REQUEST AND SET HOP/LG MSG.
  163. #
  164. LPI$NWST[0] = PIDOPST$;
  165. PUM$MSG4[0] = "AVAILABLE";
  166. END
  167. ELSE
  168. BEGIN
  169. #
  170. * THE LAST ACTIVE LLINK FOR A PID HAS GONE INACTIVE MAKING
  171. * THE PID UNAVAILABLE.
  172. * SET UNAVAIALABLE STATUS IN FUNCTION REQUEST AND SET HOP/LG MSG.
  173. #
  174. LPI$NWST[0] = PIDINOP$;
  175. PUM$MSG4[0] = "UNAVAILABLE";
  176. END
  177. #
  178. * GENERATE SETPIDA FUNCTION REQUEST Q ENTRY TO CPMRQ.
  179. * SEND HOP/LG SM MESSAGE TO OTQ.
  180. #
  181. NVFUMQE(P<CPMRQ>,LPIDBUF[0],APPTTX$,0,LPIDLEN$);
  182. NVFUMQE(P<OTQ>,PIDMSG[0],APPCMD,0,5);
  183. END
  184. END
  185. END
  186. END # NVFCUPS #
  187. TERM
cdc/nos2.source/nam5871/nvfcups.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator