User Tools

Site Tools


cdc:nos2.source:nam5871:ns_smp

NS$SMP

Table Of Contents

  • [00008] PROC NS$SMP
  • [00010] NS$SMP - SM PROCESSOR.
  • [00014] SM PROCESSOR.
  • [00050] PROC NS$DBG
  • [00056] PROC NDLOVLD
  • [00057] PROC NETGET
  • [00058] PROC NETREL
  • [00059] FUNC NS$FEC U
  • [00060] PROC NS$NSM

Source Code

NS$SMP.txt
  1. *DECK NS$SMP
  2. USETEXT COM$NS
  3. USETEXT ERR$NS
  4. USETEXT DEF$NS
  5. USETEXT SMB$NS
  6. USETEXT SMD$NS
  7.  
  8. PROC NS$SMP; # SUPERVISORY MESSAGE PROCESSOR #
  9.  
  10. # TITLE NS$SMP - SM PROCESSOR. #
  11.  
  12. BEGIN # NS$SMP #
  13. #
  14. ** NS$SMP - SM PROCESSOR.
  15. *
  16. * J.C. LEE 1981
  17. *
  18. * THIS ROUTINE PROCESSES SMS.
  19. *
  20. * PROC NS$SMP
  21. *
  22. * ENTRY:
  23. * NONE.
  24. *
  25. * EXIT:
  26. * NONE.
  27. *
  28. * METHOD:
  29. * CHECK NSUP WORD.
  30. * FOR SM AVAILABLE:
  31. * IF SM-REISSUED-BIT SET:
  32. * SKIP NETGET CALL.
  33. * ELSE
  34. * NETGET SM INTO SM BUFFER
  35. * SWITCH TO APPROPRIATE PARAGRAPH BASED ON ABT.
  36. * IF ABT EQ "HOST-SM", PROCESS HOST SM.
  37. * IF ABT EQ "NETWORK-SM", PROCESS NETWORK SM.
  38. * ELSE, FLAG ERRCODE.
  39. * IF ERRCODE NQ 0, CALL ERROR PROCESSOR.
  40. * IF MC IN NS CONTROL CARD IS NONZERO, AND THE
  41. * NUMBER OF TRACE MESSAGES ACCUMULATED ON THE
  42. * DEBUG LOG FILE REACHES MC:
  43. * CALL NETREL TO RELEASE CURRENT TRACE FILE.
  44. *
  45. #
  46.  
  47. $BEGIN
  48. XREF
  49. BEGIN
  50. PROC NS$DBG; # TRACE PROCEDURE CALL #
  51. END
  52. $END
  53.  
  54. XREF
  55. BEGIN
  56. PROC NDLOVLD; # OVERLAY LOADER #
  57. PROC NETGET; # AIP NETGET PROCEDURE #
  58. PROC NETREL; # AIP NETREL PROCEDURE #
  59. FUNC NS$FEC U; # FORMAT ERROR CODE #
  60. PROC NS$NSM; # NETWORK SUPERVISORY MESSAGE PROCESSOR #
  61. END
  62.  
  63. ITEM ABT U; # APPLICATION BLOCK TYPE #
  64. ITEM ERRCODE U; # ERROR CODE #
  65. ITEM I I; # LOOP VARIABLE #
  66. ITEM IDLE B; # SMP STATE #
  67. ARRAY HSM$OVLY [0:0] S(1);
  68. BEGIN # HOST INTERFACE OVERLAY NAME AND LEVEL #
  69. ITEM HO$NAM C(00,00,07) = ["HSMOVLY"];
  70. ITEM HO$LV1 U(00,42,09) = [2];
  71. ITEM HO$LV2 U(00,51,09) = [0];
  72. END
  73. ARRAY ERR$OVLY [0:0] S(1);
  74. BEGIN # ERROR PROCESSOR OVERLAY NAME AND LEVEL #
  75. ITEM EO$NAM C(00,00,07) = ["ERROVLY"];
  76. ITEM EO$LV1 U(00,42,09) = [5];
  77. ITEM EO$LV2 U(00,51,09) = [0];
  78. END
  79. ARRAY MKD$OVLY [0:0] S(1);
  80. BEGIN # K-DISPLAY MANAGER OVERLAY NAME AND LEVEL#
  81. ITEM MO$NAM C(00,00,07) = ["MKDOVLY"];
  82. ITEM MO$LV1 U(00,42,09) = [3];
  83. ITEM MO$LV2 U(00,51,09) = [0];
  84. END
  85.  
  86.  
  87. SWITCH ABTCASE # SWITCH FOR APPLICATION BLOCK TYPES #
  88. SMP00, # NULL BLOCK, ERROR #
  89. SMP00, # BLK BLOCK, ERROR #
  90. SMP00, # MSG BLOCK, ERROR #
  91. SMP01, # SM BLOCK ORIGINATED FROM NAM #
  92. SMP02, # SM BLOCK ORIGINATED FROM PIP/NPU #
  93. ;
  94. CONTROL EJECT;
  95.  
  96. $BEGIN
  97. NS$DBG("SMP"); # TRACE CALL #
  98. $END
  99.  
  100. IDLE = FALSE;
  101. SM$REISSUE = FALSE;
  102.  
  103. FOR I = 0 WHILE NOT IDLE
  104. DO # CHECK IF THERE IS A SUPERVISORY MESSAGE TO PROCESS #
  105. BEGIN
  106.  
  107. IF NOT SM$REISSUE
  108. THEN # NO SUPERVISORY MESSAGE GOT REISSUED #
  109. BEGIN
  110.  
  111. IF NSU$S[0]
  112. THEN # SUPERVISORY MESSAGE IS AVAILABLE #
  113. NETGET(0,ABH$WORD,SMB$BUFFER,MAX$SMSIZE); # GET SM #
  114.  
  115. ELSE # SUPERVISORY MESSAGE NOT AVAILABLE #
  116. BEGIN # EXIT FOR LOOP #
  117. IDLE = TRUE;
  118. TEST I;
  119. END
  120. END
  121.  
  122. ELSE # SUPERVISORY MESSAGE IS REISSUED #
  123. SM$REISSUE = FALSE; # CLEAR SM REISSUE FLAG #
  124.  
  125. ERRCODE = 0;
  126. ABT = ABHABT[0]; # APPLICATION BLOCK TYPE #
  127.  
  128. GOTO ABTCASE[ABT]; # CASE ON ABT #
  129.  
  130. SMP00: # SM BLOCK TYPE ERROR #
  131. ERRCODE = NS$FEC(EC"ERR$SM",SMEC"HSM$ABH");
  132. GOTO SMP03;
  133.  
  134. SMP01: # SM FROM NAM #
  135. NDLOVLD(HSM$OVLY,ERRCODE);
  136. GOTO SMP03;
  137.  
  138. SMP02: # SM FROM NETWORK #
  139. NS$NSM(ERRCODE);
  140.  
  141. SMP03:
  142. IF ERRCODE NQ 0
  143. THEN # CALL ERROR PROCESSOR #
  144. NDLOVLD(ERR$OVLY,ERRCODE);
  145.  
  146. IF DCW$F$SKD[0]
  147. THEN # K-DISPLAY DATA TO SEND #
  148. NDLOVLD(MKD$OVLY); # CALL K-DISPLAY MANAGER #
  149.  
  150. $BEGIN
  151. #
  152.   IF A NON-ZERO MC COUNT IS SPECIFIED AND THE NUMBER OF TRACE
  153.   MESSAGES ACCUMULATED ON THE DEBUG LOG FILE ZZZZZDN REACHES MC,
  154.   CALL AIP PROCEDURE -NETREL- TO RELEASE, SAVE AND PROCESS THE
  155.   CURRENT INFORMATION IN THE DEBUG LOG FILE.
  156. #
  157. IF MC NQ 0 # PERIODIC RELEASE OF ZZZZZDN SPECIFIED #
  158. AND NSU$MC[0] GQ MC # SPECIFIED MESSAGE COUNT REACHED #
  159. THEN # RELEASE CURRENT INFORMATION ON ZZZZZDN #
  160. NETREL(NRF1$LFN,MAX$TMSGSZ,0);
  161. $END
  162.  
  163. END # END FOR LOOP #
  164.  
  165. RETURN;
  166. END # NS$SMP #
  167. TERM
cdc/nos2.source/nam5871/ns_smp.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator