User Tools

Site Tools


cdc:nos2.source:nam5871:csscsr

CSSCSR

Table Of Contents

  • [00007] PROC CSSCSR
  • [00008] CSSCSR - COMPLETE STATUS REQUEST
  • [00013] COMPLETE STATUS REQUEST.
  • [00042] PROC MOVEI
  • [00043] PROC SSBCBW
  • [00044] PROC SSBTBW
  • [00045] PROC SSTAQE

Source Code

CSSCSR.txt
  1. *DECK CSSCSR
  2. USETEXT TEXTSS;
  3. USETEXT TEXTCS;
  4. USETEXT TXTSMCS;
  5. USETEXT TXTSUSS;
  6. USETEXT TXTAPSS;
  7. PROC CSSCSR;
  8. # TITLE CSSCSR - COMPLETE STATUS REQUEST #
  9.  
  10. BEGIN # CSSCSR #
  11.  
  12. #
  13. ** CSSCSR - COMPLETE STATUS REQUEST.
  14. *
  15. * C. BRION 82/05/06.
  16. *
  17. * PROC CSSCSR
  18. *
  19. * ENTRY:
  20. *
  21. * WCBUF = ONE WORD ENTRY DESCRIPTOR WORD OF QUEUE ENTRY THAT
  22. * CONTAINS THE STATUS RESPONSE SM.
  23. *
  24. * ABH = ONE WORD APPLICATION BLOCK HEADER OF THE SM.
  25. *
  26. *
  27. * EXIT:
  28. *
  29. * THE NPUCB AND OCB ARE UPDATED.
  30. *
  31. * IF STATUS IS COMPLETE, AN EVENT TO CONCLUDE THE STATUS REQUEST
  32. * IS SENT TO THE EVENT PROCESSOR.
  33. #
  34.  
  35. #
  36. **** PROC CSSCSR XREF LIST.
  37. #
  38.  
  39. XREF
  40.  
  41. BEGIN
  42. PROC MOVEI; # MOVE CM WORD INDIRECT #
  43. PROC SSBCBW; # SS- CLEAR BIT IN WORD #
  44. PROC SSBTBW; # SS- TEST BIT IN WORD #
  45. PROC SSTAQE; # SS-ACCEPT QUEUE ENTRY #
  46. END
  47.  
  48. #
  49. ****
  50. #
  51.  
  52. #
  53. * PROC CSSCSR ITEM DEFINITIONS.
  54. #
  55.  
  56. ITEM NPUORD U; # NPU ORDINAL #
  57. ITEM I U; # LOOP VAR #
  58. ITEM OCBORD U; # OCB ORDINAL #
  59. ITEM MATCH B; # MATCH INDICATOR#
  60.  
  61. $BEGIN
  62. ITEM DBVAR U;
  63. $END
  64.  
  65. #
  66. * FLG$WORD - THIS BASED ARRAY POINTS TO THE PENDING STATUS REQUEST
  67. * WORD IN THE NPUCB.
  68. #
  69. BASED ARRAY FLG$WORD [00:00] S(NPCBSZ$);
  70. BEGIN
  71. ITEM FW$WORD I(00,00,60);
  72. END
  73.  
  74.  
  75.  
  76.  
  77.  
  78. #
  79. * MAIN PROCEDURE START.
  80. #
  81.  
  82. #
  83. * LOCATE THE NPUCB THAT HAS THE NODE NUMBER EQUAL TO THE SOURCE
  84. * NODE OF THE ABH AND THE HOST NODE NUMBER EQUAL TO THE DESTINA-
  85. * TION NODE OF THE ABH. THIS MATCH WILL ALWAYS OCCUR.
  86. #
  87.  
  88. MATCH = FALSE;
  89.  
  90. FOR I = 0 STEP 1 WHILE NOT MATCH
  91. DO
  92. BEGIN
  93.  
  94. IF (ABHSN[0] EQ NPU$NID[I]
  95. AND ABHDN[0] EQ NPU$HID[I])
  96. THEN
  97. BEGIN
  98. NPUORD = I;
  99. MATCH = TRUE;
  100. END
  101.  
  102. END
  103.  
  104. #
  105. * CHECK TO VERIFY THAT A CURRENT STATUS OPERATOR STILL EXISTS FOR
  106. * THIS NPUCB. IF NOT, EXIT.
  107. #
  108.  
  109. IF NPU$OPST[NPUORD] EQ 0
  110. THEN
  111. GOTO ENDEXIT;
  112.  
  113. #
  114. * A CURRENT STATUS OPERATOR STILL ACTIVE ON THIS NPUCB.
  115. * INSURE THAT THE OCB ORDINAL IS WITHIN RANGE. IF NOT,
  116. * PROBABLY MEANS THAT THE OPERATOR ENTERED A BREAK OR THE
  117. * CONNECTION WAS TERMINATED.
  118. #
  119.  
  120. OCBORD = NPU$OPST[NPUORD];
  121. IF OCBORD LQ MAXACN$
  122. THEN
  123. BEGIN
  124. OC$CNPU[OCBORD] = 0;
  125. END
  126.  
  127. NPU$OPST[NPUORD] = 0;
  128. IF (OCBORD GQ HOPORD$ AND OCBORD LQ MAXACN$)
  129. THEN
  130. BEGIN
  131.  
  132. OC$NCNT[OCBORD] = OC$NCNT[OCBORD] - 1;
  133.  
  134. P<FLG$WORD> = LOC(NPU$STFLGS[NPUORD]);
  135. SSBCBW(FLG$WORD,OCBORD);
  136.  
  137. #
  138. * IF ALL AFFECTED NPUS HAVE RESPONDED, ISSUE STATUS DONE EVENT TO
  139. * CAUSE THE READY.. MESSAGE TO THE OPERATOR VIA THE EVENT QUEUE TO
  140. * THE EVENT PROCESSOR.
  141. * ALSO, CLEAR THE CURRENT VERB FOR THE OCB.
  142. #
  143.  
  144. IF OC$NCNT[OCBORD] EQ 0
  145. THEN
  146.  
  147. BEGIN
  148. WCB$WC[1] = 2; # SET EVENT ENTRY SIZE #
  149. WCB$SMID[1] = SMID"STUFIN"; # SET EVENT CODE #
  150. ABHADR[1] = OCBORD; # SET ACN ADDR IN ABH #
  151. SSTAQE(P<EVQ>,WCBUF[1],ABH[1],CSSM[1]);
  152. OC$VERB[OCBORD] = " ";
  153. END
  154.  
  155. #
  156. * IF THERE ARE STILL OUTSTANDING STATUS REQUEST TO BE MADE, THEN
  157. * IF THERE IS ANOTHER STATUS REQUEST PENDING FOR AN NPU THAT IS NOT
  158. * BUSY, THEN SAVE THE OCB ORDINAL IN THE NPUCB, SET THE CURRENT
  159. * AFFECTED NPUCB ORDINAL IN THE OCB, AND SEND THE STATUS REQUEST
  160. * TO THE NPU.
  161. #
  162. ELSE
  163. BEGIN
  164. MATCH = FALSE;
  165. P<FLG$WORD> = LOC(NPU$STFLGS[0]);
  166. FOR I=0 STEP 1 WHILE NOT MATCH AND
  167. I LS CSNPCNT
  168. DO
  169. BEGIN
  170. SSBTBW(FLG$WORD[I],OCBORD,MATCH);
  171. IF MATCH
  172. THEN
  173. BEGIN
  174. IF NPU$OPST[I] NQ 0
  175. THEN
  176. BEGIN
  177. MATCH = FALSE;
  178. END
  179. END
  180. END
  181.  
  182. IF MATCH
  183. THEN
  184. BEGIN
  185. I = I - 1;
  186. OC$CNPU[OCBORD] = I;
  187. NPU$OPST[I] = OCBORD;
  188.  
  189. WCB$WORD[1] = OC$WC[OCBORD] + 2;
  190. ABHWORD[1] = OC$TLC[OCBORD];
  191. ABHBT[1] = APPSUP;
  192. ABHABT[1] = APPSUP;
  193. ABHDN[1] = NPU$NID[I];
  194. ABHSN[1] = NPU$HID[I];
  195. ABHACT[1] = ACTCSNP$;
  196.  
  197. MOVEI(OC$WC[OCBORD],LOC(OC$SM[OCBORD]),LOC(CSSM[1]));
  198. SSTAQE(P<OTQ>,WCBUF[1],ABH[1],CSSM[1]);
  199. END
  200. END
  201.  
  202. END
  203.  
  204.  
  205. #
  206. * CHECK IF THERE IS ANOTHER PENDING STATUS REQUEST FOR THE NPU
  207. * THAT JUST COMPLETED. IF SO, THEN SET THE CURRENT AFFECTED
  208. * NPUCB ORDINAL IN THE OCB, SET THE CURRENT STATUS OCB ORDINAL
  209. * IN THE NPUCB, AND SEND THE STATUS REQUEST TO THE NPU.
  210. #
  211. IF NPU$STFLGS[NPUORD] NQ 0
  212. THEN
  213. BEGIN
  214. MATCH = FALSE;
  215. P<FLG$WORD> = LOC(NPU$STFLGS[NPUORD]);
  216. FOR I=HOPORD$ STEP 1 WHILE NOT MATCH AND
  217. I LQ MAXACN$
  218. DO
  219. BEGIN
  220. SSBTBW(FLG$WORD,I,MATCH);
  221.  
  222. IF MATCH
  223. THEN
  224. BEGIN
  225. IF OC$CNPU[I] NQ 0
  226. THEN
  227. BEGIN
  228. MATCH = FALSE;
  229. END
  230. END
  231. END
  232.  
  233. IF MATCH
  234. THEN
  235. BEGIN
  236. I = I - 1;
  237. OC$CNPU[I] = NPUORD;
  238. NPU$OPST[NPUORD] = I;
  239.  
  240. WCB$WORD[1] = OC$WC[I] + 2;
  241. ABHWORD[1] = OC$TLC[I];
  242. ABHBT[1] = APPSUP;
  243. ABHABT[1] = APPSUP;
  244. ABHDN[1] = NPU$NID[NPUORD];
  245. ABHSN[1] = NPU$HID[NPUORD];
  246. ABHACT[1] = ACTCSNP$;
  247.  
  248. MOVEI(OC$WC[I],LOC(OC$SM[I]),LOC(CSSM[1]));
  249. SSTAQE(P<OTQ>,WCBUF[1],ABH[1],CSSM[1]);
  250. END
  251. END
  252.  
  253.  
  254. ENDEXIT:
  255.  
  256. $BEGIN
  257.  
  258. DBVAR = 1;
  259.  
  260. $END
  261.  
  262. END #CSSCSR#
  263.  
  264. TERM
cdc/nos2.source/nam5871/csscsr.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator