User Tools

Site Tools


cdc:nos2.source:nam5871:cstsnr

CSTSNR

Table Of Contents

  • [00007] PROC CSTSNR (SWTESS)
  • [00008] CSTSNR - START NCF READ REQUESTS.
  • [00012] START NCF READ REQUESTS.
  • [00058] PROC CSTRND
  • [00059] PROC MOVE
  • [00060] PROC READLS
  • [00061] PROC SSTAQE
  • [00062] PROC SSTATS
  • [00063] PROC SSTRTS
  • [00064] PROC XSST

Source Code

CSTSNR.txt
  1. *DECK CSTSNR
  2. USETEXT TEXTCS
  3. USETEXT TXTCTCS
  4. USETEXT TXTSMCS
  5. USETEXT TXTAPSS
  6. USETEXT TXTSUSS
  7. PROC CSTSNR (SWTESS);
  8. # TITLE CSTSNR - START NCF READ REQUESTS. #
  9.  
  10. BEGIN # CSTSNR #
  11. #
  12. ** CSTSNR - START NCF READ REQUESTS.
  13. *
  14. * D. G. DEPEW. 81/08/06.
  15. *
  16. * THIS PROCEDURE INITIATES THE READING OF THE NCF LINE RECORD
  17. * REQUIRED TO PROCESS A CONFIGURE TERMINAL REQUEST (CNF/TE/R SM)
  18. * FROM AN NPU.
  19. *
  20. * PROC CSTSNR (SWTESS)
  21. *
  22. * ENTRY THE CONFIGURE TERMINAL REQUEST QUEUE CONTAINS ONE OR MORE
  23. * CNF/TE/R SMS EXCEPT FOR A SINGLE, FIRST TIME CALL MADE
  24. * DURING INITIALIZATION AT WHICH TIME THE QUEUE IS EMPTY.
  25. * THE NCF READ REQUESTS QUEUE IS EMPTY.
  26. *
  27. * EXIT A CIO READLS FUNCTION IS ISSUED FOR UP TO 10 LINE RECORDS.
  28. * THE CORRESPONDING ENTRIES HAVE BEEN MADE IN THE NCF READ
  29. * REQUESTS QUEUE.
  30. * A CNF/TE/A SM IS PLACED IN THE OUTGOING TRAFFIC QUEUE IF
  31. * THE LINE CANNOT BE LOCATED IN THE LINE RECORD INDEX
  32. * (THIS SHOULD NEVER HAPPEN).
  33. * FORMAL ARRAY SWTESS IS SET SO THAT PROC CSTRND IS CALLED
  34. * WHEN THE NCF FET COMPLETE BIT IS SET OR THE IN POINTER
  35. * CHANGES.
  36. * ALL CONFIGURE TERMINAL REQUEST QUEUE ENTRIES THAT GET
  37. * PROCESSED ARE DELETED FROM THAT QUEUE.
  38. * FOR THE INITIALIZATION CALL AND FOR THE HOPEFULLY
  39. * IMPOSSIBLE CIRCUMSTANCE WHEREIN NONE OF THE LINES FOR
  40. * WHICH CNF/TE/R SMS HAVE BEEN RECEIVED CAN BE LOCATED IN
  41. * THE LINE RECORD INDEX, FORMAL ARRAY SWTESS IS SET SUCH
  42. * THAT THIS ROUTINE WILL AGAIN BE CALLED WHEN AN ENTRY IS
  43. * MADE IN THE CONFIGURE TERMINAL REQUEST QUEUE.
  44. *
  45. * NOTES THIS ROUTINE COMBINES THE LOGIC OF CS GID PROCESSES 4.2
  46. * AND 4.3. THIS WAS DONE BECAUSE THOSE PROCESSES ARE
  47. * SHORT, IT SAVES SOME DATA SHUFFLING, AND IT MAKE CS MORE
  48. * RESPONSIVE TO THE CONFIGURE TERMINAL REQUEST QUEUE.
  49. #
  50.  
  51. *CALL SWTESS
  52.  
  53. #
  54. **** PROC CSTSNR - XREF LIST BEGIN.
  55. #
  56. XREF
  57. BEGIN
  58. PROC CSTRND; #RECEIVE NCF DATA #
  59. PROC MOVE; #MOVE STORAGE DIRECT ADDRESSING (MACREL) #
  60. PROC READLS; #ISSUE CIO READLS FUNCTION (MACREL) #
  61. PROC SSTAQE; #ACCEPT QUEUE ENTRY #
  62. PROC SSTATS; #ALLOCATE STORAGE AT END OF TABLE #
  63. PROC SSTRTS; #REMOVE STORAGE ANYWHERE IN TABLE #
  64. PROC XSST; #SHELL SORT TBL IN ASCENDING ORDER(MACREL)#
  65. END
  66. #
  67. ****
  68. #
  69.  
  70.  
  71. ITEM I; #LOOP INDUCTION VARIABLE #
  72. ITEM LORD; #LINE RECORD INDEX ENTRY ORDINAL #
  73. ITEM QORD; #CALCULATED ORDINAL OF ANY DESIRED Q ENTRY#
  74. ITEM WC; #WORD COUNT OF CTQ/NRQ ENTRIES #
  75.  
  76. ARRAY LRIKEY [00:00] S(1); #LINE RECORD INDEX SEARCH KEY #
  77. BEGIN
  78. ITEM LK$WORD U(00,00,60); #WHOLE WORD FOR ACTUAL SEARCH KEY#
  79. ITEM LK$NPUID U(00,44,08); #NPU NODE ID TO SEARCH LRI FOR #
  80. ITEM LK$PORT U(00,52,08); #PORT NUMBER TO SEARCH LRI FOR #
  81. END
  82.  
  83.  
  84.  
  85.  
  86.  
  87. RLCOUNT = 0; # INITIALIZE COUNT OF RECORDS TO BE READ #
  88. FOR I=0 WHILE CTQL NQ 0
  89. AND RLCOUNT LS RLMAX$
  90. DO # LOOP UNTIL CTQ EMPTY OR 10 RECS TO READ #
  91. BEGIN
  92. WC = CTQ$ESIZE[0]; # SET SIZE OF CURRENT ENTRY #
  93. LK$WORD[0] = 0;
  94. LK$NPUID[0] = CTQ$NPUID[0]; # SET UP TO SEARCH LINE REC INDEX #
  95. LK$PORT[0] = CTQ$PORT[0];
  96. FOR LORD=0 STEP 1 # SEARCH LRI FOR LARGER NPU/PORT COMBO #
  97. WHILE LK$WORD[0] GQ LIKEY[LORD]
  98. DO
  99. BEGIN END
  100. LORD = LORD - 1; # DESIRED NTRY ONE BEFORE LARGER NPU/PORT #
  101.  
  102. IF CTQ$NPUID[0] EQ LINID[LORD]
  103. AND CTQ$PORT[0] LQ (LIPORT[LORD] + LIGC[LORD])
  104. THEN # NPU NODE ID AND PORT NUMBER ARE VALID #
  105. BEGIN # PREPARE FOR ISSUANCE OF NCF READ REQUEST#
  106. RLI$RPA[RLCOUNT] = LIRPA[LORD]; # SET UP READ LIST INDEX #
  107. RLI$LRIORD[RLCOUNT] = LORD;
  108. RLCOUNT = RLCOUNT + 1;
  109. QORD = NRQL; # SAVE ORD OF NEXT NCF READ QUEUE ENTRY #
  110. SSTATS (P<NRQ>, WC); # ADD NEW ENTRY SPACE TO NCF READ Q #
  111. MOVE (WC, CTQ, NRQ[QORD]); # MAKE THE ENTRY #
  112. NRQ$LRIORD[QORD] = LORD; # COMPLETE NCF READ QUEUE ENTRY #
  113. END
  114. ELSE # BOGUS CNF/TE/R SM RECEIVED #
  115. BEGIN # ISSUE CNF/TE/A #
  116.  
  117. # THE FOLLOWING CODE REFERENCES ITEMS IN TWO BASED ARRAYS, *CSSM* #
  118. # (IN TXTSMCS) AND *APSM* (IN TXTAPSS), THAT DEFINE DIFFERENT PARTS#
  119. # OF THE BODY OF ANY SM CS MAY SEND OR RECEIVE. THESE TWO BASED #
  120. # ARRAYS ARE POINTED TO THE SM BUFFER, *MSGBUF* (IN TEXTSS), AT #
  121. # INITIALIZATION TIME. ALSO, BASED ARRAY *ABH* (IN TXTAPSS) IS #
  122. # USED, WHICH AGAIN IS POINTED TO THE ABH BUFFER, *ABHBUF* (IN #
  123. # TEXTSS), AT INITIALIZATION TIME. SINCE THESE BASED ARRAYS ARE #
  124. # PREPOINTED, THIS PROC DOES NOT REQUIRE TEXTSS. #
  125.  
  126. ABHWORD[1] = CTQ$WORD[1]; # SET UP OUTGOING ABH #
  127. ABHSN[1] = ABHDN[1]; # REVERSE DN AND SN FOR RESPONSE SM #
  128. ABHDN[1] = CTQ$NPUID[0]; # DESTINATION #
  129. ABHTLC[1] = NCNFA; # DEFINED IN TXTSMCS. ABH COMPLETE #
  130. SPMSG0[1] = 0; # SET UP CNF/TE/A SM BODY #
  131. PFCSFC[1] = CNFTEA; # DEFINED IN TXTSUSS #
  132. CNFP[1] = CTQ$PORT[0]; # SM BODY COMPLETE #
  133. SSTAQE (P<OTQ>, CTEAQL$, ABH[1], CSSM[1]); # QUEUE CNF/TE/A#
  134. END
  135. SSTRTS (P<CTQ>, 0, WC); # DELETE 1ST ENTRY IN CNF/TE/R QUEUE #
  136. END
  137.  
  138.  
  139. IF RLCOUNT NQ 0
  140. THEN # THERE ARE TERMINALS TO CONFIGURE #
  141. BEGIN # PREPARE AND ISSUE READLS FUNCTION #
  142. XSST (RLI, RLCOUNT); # SORT THE READ LIST INDEX #
  143. FOR I=0 STEP 1 UNTIL RLCOUNT-1
  144. DO # SET UP ACTUAL READ LIST FOR READLS FUNC #
  145. RL$RPA[I] = RLI$RPA[I];
  146. RL$RPA[RLCOUNT] = 0; # INDICATE END OF READ LIST #
  147. RLIORD = 0; # INITIALIZE POINTER TO CURRENT RLI ENTRY #
  148. NF$LA[0] = LOC (READLIST); # STORE READ LIST ADDRESS IN FET #
  149. READLS (NCFFET); # ISSUE READLS FUNCTION #
  150.  
  151. # SET UP FORMAL RETURN PARAMETER ARRAY SWTESS. #
  152.  
  153. STE$ADDR1[0] = LOC (NCFFET); # WATCH COMP BIT IN 1ST WD OF FET#
  154. STE$ADDR2[0] = LOC (NF$IN[0]); # WATCH FET IN POINTER #
  155. STE$RTN[0] = LOC (CSTRND); # RECEIVER OF NCF LINE RECORDS #
  156. STE$INIT1[0] = NF$WORD[0]; # SET UP INIT VALUE OF FET 1ST WD #
  157. STE$CBIT1[0] = FALSE; # CALL *CSTRND* WHEN FET COMP BIT IS SET#
  158. STE$INIT2[0] = NF$OUT[0]; # CALL *CSTRND* WHEN *IN* NQ *OUT* #
  159. END
  160. ELSE # ALL CNF/TE/R SMS WERE INVALID (YUK) OR #
  161. BEGIN # THIS IS INITIALIZATION CALL #
  162. ICSTSNR = 0; # INSURE INTERRUPT CELL IS CLEAR #
  163. STE$ADDR1[0] = LOC (ICSTSNR); # WATCH INTERRUPT CELL #
  164. STE$ADDR2[0] = 0; # ONLY WATCHING ONE CELL #
  165. STE$RTN[0] = LOC (CSTSNR); # RECALL THIS ROUTINE #
  166. STE$INIT1[0] = 0; # CALL WHEN ENTRIES IN CNF/TE/R Q NONZERO #
  167. STE$INIT2[0] = 0;
  168. END
  169.  
  170. END # CSTSNR #
  171.  
  172.  
  173.  
  174.  
  175. TERM
cdc/nos2.source/nam5871/cstsnr.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator