User Tools

Site Tools


cdc:nos2.source:nam5871:relncnb

RELNCNB

Table Of Contents

  • [00015] PRGM RELNCNB
  • [00065] PROC KPUT
  • [00066] PROC LOCLLCB
  • [00067] PROC MRELS
  • [00068] PROC MCLRIL
  • [00069] PROC MSETIL
  • [00070] PROC OMSG
  • [00071] PROC ABORT
  • [00072] PROC XTRACE

Source Code

RELNCNB.txt
  1. *DECK RELNCNB
  2. USETEXT NIPDEF
  3. USETEXT ACNB
  4. USETEXT PARAMS
  5. USETEXT PT
  6. USETEXT NCNB
  7. USETEXT DUMPFLG
  8. USETEXT DRHDR
  9. USETEXT LLCB
  10. USETEXT MSGIDX
  11. USETEXT NCNT
  12. USETEXT KDIS
  13. USETEXT KHDRX
  14. USETEXT STATTAB
  15. PRGM RELNCNB; # RELEASE NETWORK CONNECTION BLOCK #
  16. STARTIMS;
  17. #
  18. *1DC RELNCNB
  19. *
  20. * 1. PROC NAME AUTHOR DATE
  21. * RELNCNB C. BITTNER 81/04/07
  22. *
  23. * 2. FUNCTIONAL DESCRIPTION
  24. * RELEASE THE NETWORK CONTROL BLOCK
  25. *
  26. * 3. METHOD USED
  27. * CHECK IF THERE ARE ANY CONNECTIONS ON NCNT.
  28. * IF NOT, THEN RELEASE NCNT. RELEASE DATA RING AND
  29. * ACKNOWLEDGE QUEUE. RELEASE NCNB AND UPDATE INFORMATION
  30. * IN THE LLCB.
  31. *
  32. * 4. ENTRY PARAMETERS
  33. * PARAMS1 - ADDRESS OF NCNB TO RELEASE
  34. *
  35. * 5. EXIT PARAMETERS
  36. * NONE
  37. *
  38. * 6. COMDECKS CALLED AND SYMPL TEXTS USED
  39. * ACNB PARAMS
  40. * NIPDEF DRHDR
  41. * STATTAB NCNB
  42. * LLCB MSGIDX
  43. * NCNT KDIS
  44. * OSSIZE
  45. *
  46. * 7. ROUTINES AND OVERLAYS CALLED
  47. * OMSG - ISSUE DAYFILE MESSAGE
  48. * XTRACE - RECORD PROCEDURE CALLS
  49. * KPUT - UPDATE K-DISPLAY STATUS
  50. * LOCLLCB - LOCATE LLCB
  51. * MRELS - RETURN BUFFER
  52. *
  53. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
  54. * THIS PROGRAM IS CALLED BY NCSTTP.
  55. * W A R N I N G - THIS PROGRAM CANNOT EXCEED THE SECONDARY
  56. *CALL OSSIZE
  57. *
  58.  #
  59. STOPIMS;
  60. #
  61.   EXTERNAL VARIABLES
  62. #
  63. XREF
  64. BEGIN
  65. PROC KPUT ;
  66. PROC LOCLLCB; # LOCATE LLCB #
  67. PROC MRELS; # RETURN BUFFER #
  68. PROC MCLRIL ; # CLEAR INTERLOCK ROUTINE #
  69. PROC MSETIL ; # REQUEST INTERLOCK ROUTINE #
  70. PROC OMSG; # DAYFILE MESSAGE #
  71. PROC ABORT ;
  72. PROC XTRACE; # RECORD PROCEDURE CALLS #
  73. LABEL RJMAIN; # RETURN ADDRESS IN OVLCALL #
  74. END
  75. #
  76.  INTERNAL VARIABLES
  77. #
  78. ITEM LLCBAD; # LLCB ADDRESS #
  79. ITEM LLCBINDX; # INDEX INTO LLCB #
  80. ITEM CURR; # INDUCTION LOOP VARIABLE #
  81. ITEM NEXT; # NEXT ENTRY IN DATA RING #
  82. ITEM NCNTINDX; # INDEX INTO NCNT #
  83. ITEM KN U;
  84.  
  85. ARRAY CNX;
  86. BEGIN
  87. ITEM CNE U(00,00,60); # NETWORK CONNECTION NUMBER #
  88. ITEM CN1 U(00,52,04); # CONNECTION INDEX #
  89. ITEM CN2 U(00,56,04); # INDEX INTO NCNT #
  90. END
  91.  
  92. #**********************************************************************#
  93.  
  94.  
  95.  
  96.  
  97.  
  98. BEGIN
  99.  
  100. CONTROL IFEQ DEBUG,1;
  101. XTRACE("RNCNB") ;
  102. CONTROL FI;
  103.  
  104. P<NCNB> = PARAMS1; # BASE NETWORK CONNECTION BLOCK #
  105.  
  106. # RELEASE DATA RING #
  107. P<DRHDRWD> = 0;
  108. CURR = NCNBDRFP[0]; # FIRST ENTRY IN DATA RING #
  109. FOR CURR = CURR WHILE CURR NQ LOC(NCNBDRFP[0]) AND CURR NQ 0 DO
  110. BEGIN
  111. NEXT = NEXTPTR[CURR]; # NEXT ENTRY IN DATA RING #
  112. MRELS(CURR); # RELEASE DATA RING ENTRY #
  113. CURR = NEXT;
  114. END
  115.  
  116. # RELEASE ACKNOWLEDGE QUEUE #
  117. IF NCNBACKQ[0] NQ 0
  118. THEN
  119. MRELS(NCNBACKQ[0]); # RELEASE ACKNOWLEDGE QUEUE #
  120.  
  121. CONTROL IFEQ STAT,1; # STATISTICS ON #
  122. ST$AQX = ST$AQX + 1; # INCREMENT NO. ACKQ-S RELEASED #
  123. CONTROL FI;
  124.  
  125.  
  126. #
  127.  CHECK IF THERE ARE ANY CONNECTIONS ON NCNT.
  128.  IF NOT, THEN RELEASE NCNT
  129. #
  130. P<NCNT> = NCNBCTAD; # BASE NETWORK CONNECTION TABLE #
  131. CNE[0] = NCNBCN[0]; # NETWORK CONNECTION NUMBER #
  132. LLCBINDX = CN1 + LLCBHSIZE; # INDEX INTO LLCB #
  133. NCNTINDX = CN2 + NCNTHSIZE; # INDEX INTO NCNT #
  134. LOCLLCB(NCNBHN[0],NCNBTN[0],LLCBAD); # LOCATE LLCB #
  135. P<LLCB> = LLCBAD; # BASE LLCB #
  136. CONTROL IFEQ DEBUG,1;
  137. IF P<LLCB> EQ 0
  138. THEN
  139. BEGIN
  140. D27M2[0] = "RELNCNB";
  141. OMSG(DFMSG27,0); # NIP INTERNAL ERROR #
  142. ABORT(0,0) ;
  143. END
  144. CONTROL FI;
  145. MSETIL(P<LLCB>) ; # REQUEST INTERLOCK WITH THIS LLCB #
  146. NCNTNCN[0] = NCNTNCN[0] - 1; # DECREMENT NO. ACTIVE CONN #
  147. CONCOUNT = CONCOUNT -1 ;
  148. IF CONCOUNT LS MAXSWIT
  149. THEN
  150. BEGIN
  151. TBUF = 10000;
  152. NFSIZE = 1536;
  153. END
  154. IF NCNTNCN[0] EQ 0
  155. THEN # LAST ENTRY DELETED #
  156. BEGIN
  157. MRELS(P<NCNT>); # RELEASE NCNT #
  158. LLCBNCNT[LLCBINDX] = 0; # CLEAR NCNT ADDRESS IN LLCB #
  159. END
  160. ELSE
  161. BEGIN
  162. NCNTWD[NCNTINDX] = 0; # DELETE NCNT ENTRY #
  163. END
  164. LLCBNC[0] = LLCBNC[0] - 1; # DECREMENT NO. CONN ON LOG LINK #
  165. MCLRIL ;
  166. IF KDIS$RT # REAL TIME UPDATE MODE IN EFFECT #
  167. AND NCNBDT[0] NQ DT$INTA # NOT AN INTRA-HOST A-A CONN #
  168. AND LLCBKNDX[0] NQ 0 # LLCB ENTRY EXISTS IN ST #
  169. AND LLCBKNDX[0] GQ KDLGLST[0]
  170. AND LLCBKNDX[0] LQ KDLGLND[0]
  171. THEN
  172. BEGIN
  173. IF KDESTST[0] EQ 0 THEN
  174. KN=LLCBKNDX[0]-KDLGLST[0];
  175. ELSE
  176. IF KDAPPST[0] EQ 0 THEN
  177. KN=LLCBKNDX[0]+KDESTND[0]-KDESTST[0];
  178. ELSE
  179. KN=LLCBKNDX[0]+KDESTND[0]+KDAPPND[0]-KDAPPST[0];
  180. KPUT(KHDRNP[0],KN,KPLGNCN,LLCBNC[0]) ;
  181. END
  182. IF NCNBACNB[0] NQ 0
  183. THEN
  184. BEGIN # ACNB EXISTS #
  185. P<ACNB> = NCNBACNB[0];
  186. ACNBNCNB[0] = 0; # CLEAR NCNB TWIN POINTERS #
  187. END
  188. MRELS(P<NCNB>); # RELEASE NCNB #
  189.  
  190. GOTO RJMAIN; # RETURN TO CALLING PROGRAM #
  191. END
  192. TERM
cdc/nos2.source/nam5871/relncnb.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator