User Tools

Site Tools


cdc:nos2.source:nam5871:ns_tna

NS$TNA

Table Of Contents

  • [00008] PROC NS$TNA
  • [00010] NS$TNA - TERMINATE NPU ACTIVITY.
  • [00014] TERMINATE NPU ACTIVITY.
  • [00053] PROC NS$DBG
  • [00059] PROC NS$STD
  • [00060] PROC RECALL
  • [00061] PROC RETTSB
  • [00062] PROC TSBINFO

Source Code

NS$TNA.txt
  1. *DECK NS$TNA
  2. USETEXT COM$NS
  3. USETEXT LTSB$NS
  4. USETEXT NAT$NS
  5. USETEXT NCT$NS
  6. USETEXT NPT$NS
  7.  
  8. PROC NS$TNA; # TERMINATE NPU ACTIVITY #
  9.  
  10. # TITLE NS$TNA - TERMINATE NPU ACTIVITY. #
  11.  
  12. BEGIN # NS$TNA #
  13. #
  14. ** NS$TNA - TERMINATE NPU ACTIVITY.
  15. *
  16. * J.C. LEE 1981
  17. *
  18. * THIS ROUTINE TERMINATES NPU ACTIVITY.
  19. *
  20. * PROC NS$TNA
  21. *
  22. * ENTRY:
  23. * NONE.
  24. *
  25. * EXIT:
  26. * NONE.
  27. *
  28. * METHOD:
  29. * UPDATE NODE-CONNECTION-TABLE (NCT).
  30. * IF NCT ORDINAL NQ 0:
  31. * USE NCT ORDINAL TO INDEX INTO NCT TO GET
  32. * NCT TABLE ENTRY.
  33. * CLEAR NEIGHBOR NPU ACTIVE FLAG.
  34. * DELINK NCT TABLE ENTRY FORM ACTIVE-NODE-LIST.
  35. * LINK NCT TABLE ENTRY TO IDLE-NODE-LIST.
  36. * IF PICB EXISTS, RELEASE PICB.
  37. * CLEAN UP NPU TABLE (NPT).
  38. * DELINK NAT.
  39. * RELEASE NAT TSB.
  40. * IF NAT LIST EMPTY AND GRADUAL SHUTDOWN REQUESTED:
  41. * SHUTDOWN NS.
  42. * DECREMENT LOAD TSB ACTIVITY COUNT.
  43. * IF LOAD TSB ACTIVITY COUNT LQ 0:
  44. * LOCATE LOAD-TSB.
  45. * RELEASE LOAD-TSB.
  46. * CLEAR LOAD-TSB WORD IN TABLE POINTER AREA.
  47. *
  48. #
  49.  
  50. $BEGIN
  51. XREF
  52. BEGIN
  53. PROC NS$DBG; # TRACE PROCEDURE CALL #
  54. END
  55. $END
  56.  
  57. XREF
  58. BEGIN
  59. PROC NS$STD; # SHUTDOWN NS #
  60. PROC RECALL; # RECALL #
  61. PROC RETTSB; # RELEASE TSB #
  62. PROC TSBINFO; # LOCATE TSB #
  63. END
  64.  
  65. ITEM ACOUNT U; # LOAD TSB ACTIVITY COUNT #
  66. ITEM BACKPTR U; # BACK POINTER #
  67. ITEM NCTORD U; # MODE CONNECTION TABLE ORDINAL #
  68. ITEM NEXTPTR U; # NEXT POINTER #
  69. ITEM TAILPTR U; # TAIL POINTER OF NCT LIST IN NCT ORDINAL #
  70. ITEM TSBN U; # TSB NUMBER #
  71. ITEM TSBFWA U; # TSB FWA #
  72. ITEM TSBSIZE U; # TSB SIZE #
  73.  
  74. CONTROL EJECT;
  75.  
  76. $BEGIN
  77. NS$DBG("TNA"); # TRACE CALL #
  78. $END
  79.  
  80. #
  81.   UPDATE NODE CONNECTION TABLE ENTRY
  82. #
  83. NCTORD = NAT$NCTORD[0]; # NODE CONNECTION TABLE ORDINAL #
  84.  
  85. IF NCTORD NQ 0
  86. THEN # ONGOING NPU DUMPING/LOADING ACTIVITY #
  87. BEGIN # LINK NOT ENTRY TO END OF NCT LIST #
  88. NCT$F$ACT[NCTORD] = FALSE; # CLEAR NEIGHBOR NPU ACTIVE FLAG#
  89. TAILPTR = NCT$LISTTP[0]; # SAVE TAIL PTR OF NCT LIST #
  90.  
  91. IF TAILPTR NQ NCTORD
  92. THEN # NCT ENTRY NOT AT END OF LIST #
  93. BEGIN
  94. NEXTPTR = NCT$LISTFP[NCTORD]; # SAVE CURRENT NEXT PTR #
  95. BACKPTR = NCT$LISTBP[NCTORD]; # SAVE CURRENT BACK PTR #
  96. NCT$LISTFP[TAILPTR] = NCTORD;
  97. NCT$LISTBP[NCTORD] = TAILPTR;
  98. NCT$LISTFP[NCTORD] = 0; # INDICATE END OF LIST #
  99. NCT$LISTTP[0] = NCTORD; # UPDATE TAIL PTR OF NCT LIST #
  100. NCT$LISTFP[BACKPTR] = NEXTPTR;
  101. NCT$LISTBP[NEXTPTR] = BACKPTR;
  102. END
  103.  
  104. TSBN = NAT$PITSBN[0];
  105. IF TSBN NQ 0
  106. THEN # PICB EXISTS #
  107. RETTSB(TSBN); # RELEASE PICB #
  108.  
  109. END
  110. #
  111.   CLEAN UP NPU TABLE
  112. #
  113. TSBN = NPT$NATTSB[NTORD]; # TSB NUMBER OF NAT #
  114. NPT$NCTORD[NTORD] = 0;
  115. NPT$NATTSB[NTORD] = 0;
  116. NATTSBN = 0;
  117. #
  118.   DELINK NAT FROM NAT LIST
  119. #
  120. NEXTPTR = NAT$NLFP[0]; # NAT LIST FORWARD PTR #
  121. BACKPTR = NAT$NLBP[0]; # NAT LIST BACKWARD PTR #
  122. P<NAT> = 0;
  123.  
  124. IF NEXTPTR EQ 0
  125. THEN # LAST NAT IN LIST #
  126. NPT$NLTAIL[0] = BACKPTR; # UPDATE TAIL PTR #
  127.  
  128. ELSE # NAT TO FOLLOW #
  129. BEGIN
  130. TSBINFO(TSBSIZE,TSBFWA,NEXTPTR); # LOCATE NEXT NAT IN LIST #
  131. NAT$NLBP[TSBFWA] = BACKPTR; # UPDATE BACK PTR OF NEXT NAT #
  132. END
  133.  
  134. IF BACKPTR EQ 0
  135. THEN # FIRST NAT IN LIST #
  136. NPT$NLHEAD[0] = NEXTPTR; # UPDATE HEAD PTR #
  137.  
  138. ELSE # PRECEDING NAT EXISTS #
  139. BEGIN
  140. TSBINFO(TSBSIZE,TSBFWA,BACKPTR); # LOCATE PRECEDING NAT #
  141. NAT$NLFP[TSBFWA] = NEXTPTR; # UPDATE PRECEDING NAT NEXT PTR #
  142. END
  143.  
  144. RETTSB(TSBN); # RELEASE NAT TSB #
  145.  
  146. IF NPT$NLHEAD[0] EQ 0 # EMPTY NAT LIST #
  147. AND GRADSHUT # GRADUAL SHUTDOWN REQUESTED #
  148. THEN
  149. NS$STD; # SHUTDOWN NS #
  150. #
  151.   DECREMENT LOAD TSB ACTIVITY COUNT
  152. #
  153. ACOUNT = LTW$ACOUNT[0] - 1;
  154. LTW$ACOUNT[0] = ACOUNT; # DECREMENT LOAD TSB ACTIVITY COUNT #
  155. IF ACOUNT LQ 0
  156. THEN # NO OTHER LOAD ACTIVITY IN PROGRESS #
  157. BEGIN
  158. TSBN = LTW$LTSBN[0]; # TSB NUMBER OF LOAD TSB #
  159. TSBINFO(TSBSIZE,TSBFWA,TSBN); # LOCATE LOAD TSB #
  160. P<LTSB$FET> = TSBFWA + L$LTSBHDR; # FWA OF LOAD FET #
  161. RECALL(LTSB$FET); # MAKE SURE I/O COMPLETE #
  162. RETTSB(TSBN); # RELEASE LOAD TSB #
  163. LTW$WORD[0] = 0; # CLEAR LOAD TSB WORD #
  164. END
  165.  
  166. RETURN;
  167. END # NS$TNA #
  168. TERM
cdc/nos2.source/nam5871/ns_tna.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator