User Tools

Site Tools


cdc:nos2.source:nam5871:hwlp

Table of Contents

HWLP

Table Of Contents

  • [00015] PROC HWLP
  • [00069] PROC HPAWL
  • [00070] PROC HPGET
  • [00071] PROC HPGETMM
  • [00072] PROC HPGETSM
  • [00073] PROC HPPUT
  • [00074] PROC HPWAIT
  • [00075] PROC HPXFR
  • [00076] PROC HPPUTQ
  • [00077] PROC HRELWWL
  • [00078] PROC MRELS
  • [00079] PROC OTIME
  • [00080] PROC OVLCALL
  • [00081] PROC XTRACE

Source Code

HWLP.txt
  1. *DECK HWLP
  2. USETEXT NIPDEF
  3. USETEXT APPSTAT
  4. USETEXT AWLNTRY
  5. USETEXT DRHDR
  6. USETEXT FREETAB
  7. USETEXT NWLHEAD
  8. USETEXT NWLNTRY
  9. USETEXT OVERLAY
  10. USETEXT PARAMP
  11. USETEXT PT
  12. USETEXT AT
  13. USETEXT ACB
  14. USETEXT STATTAB
  15. PROC HWLP; # PROCESS WORKLIST #
  16.  
  17. STARTIMS;
  18. #
  19. *1DC HWLP
  20. *
  21. * 1. PROC NAME AUTHOR DATE
  22. * HWLP E. GEE 78/01/25
  23. *
  24. * 2. FUNCTIONAL DESCRIPTION.
  25. * PROCESS NETWORK WORKLIST
  26. *
  27. * 3. METHOD USED.
  28. * PROCESS WORKLIST ENTRIES UNTIL NONE LEFT OR LAST WORKLIST
  29. * FUNCTION NOT COMPLETED
  30. * CHECK FOR VALID AIP HEADER WORD
  31. * CALL APPROPRIATE ROUTINE TO PROCESS NETWORK WORKLIST ENTRY
  32. * FUNCTION
  33. * IF ENTIRE WORKLIST PROCESSED, THEN PROCESS AWL (IF ONE TO
  34. * PROCESS) AND RELEASE REST OF NWL
  35. *
  36. * 4. ENTRY PARAMETERS.
  37. * ACBADDR ACB ADDRESS
  38. *
  39. * 5. EXIT PARAMETERS.
  40. * ABTAPPF ABORT FLG SET IF AIP SENT US BAD WORKLIST
  41. * ENTRY
  42. *
  43. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  44. * APPSTAT BUFFTAB DRHDR
  45. * NIPDEF NWLHEAD NWLNTRY
  46. * ACB
  47. * STATTAB STATISTICS TABLE
  48. *
  49. * 7. ROUTINES AND OVERLAYS CALLED.
  50. * HPAWL PROCESS AWL
  51. * HPGET PROCESS *NETGET*
  52. * HPGETMM PROCESS *NETGMM*
  53. * HPGETSM PROCESS *NETGSM*
  54. * HPPUT PROCESS *NETPUT*
  55. * HPWAIT PROCESS *NETWAIT*
  56. * HRELWWL RELEASE WHOLE WORKLIST
  57. * OTIME GET SYSTEM RTIME
  58. * XTRACE RECORD PROCEDURE CALLS
  59. *
  60. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION.
  61. * THIS PROCEDURE IS CALLED BY HHIR,HPFL, AND XSACB.
  62. *
  63.  #
  64. STOPIMS;
  65. #
  66.   EXTERNAL VARIABLES
  67. #
  68. XREF BEGIN
  69. PROC HPAWL; # PROCESS APPLICATION WORKLIST #
  70. PROC HPGET; # PROCESS NETGET, NETGETL, NEGETF, NETGTFL#
  71. PROC HPGETMM ; # PROCESS GETMM WORKLIST #
  72. PROC HPGETSM; # PROCESS NETGETSM #
  73. PROC HPPUT; # PROCESS NETPUT, NETPUTF #
  74. PROC HPWAIT; # PROCESS NETWAIT #
  75. PROC HPXFR ;
  76. PROC HPPUTQ ;
  77. PROC HRELWWL; # RELEASE WHOLE NWL #
  78. PROC MRELS; # RELEASE BUFFER SAPCE #
  79. PROC OTIME; # GET SYSTEM RTIME #
  80. PROC OVLCALL; # LOAD AND EXECUTE OVERLAY #
  81. PROC XTRACE; # TRACE CALL #
  82. END
  83. #
  84.   INTERNAL VARIABLES
  85. #
  86. #
  87.   NWL OP-CODE JUMP TABLE
  88. #
  89. SWITCH NWLOPJT ,OP1,OP2,OP3,OP4,OP5,OP6,OP7,OP8,OP9,
  90. OP10,OP11,OP12,OP13,OP14,OP15,OP16,OP17,OP18;
  91.  
  92. ITEM TEMP;
  93.  
  94. CONTROL IFEQ STAT,1;
  95. ARRAY STIME P(1); # RTIME BUFFER FOR STARTING TIME #
  96. BEGIN
  97. ITEM SMILS U(0,24,36); # STARTING TIME IN MILLESECONDS #
  98. END
  99. ARRAY ETIME P(1); # RTIME BUFFER FOR ENDING TIME #
  100. BEGIN
  101. ITEM EMILS U(0,24,36); # ENDING TIME IN MILLESECONDS #
  102. END
  103.  
  104. ITEM STTEMP; # TEMPORARY STATISTICS VARIABLE #
  105. CONTROL FI;
  106.  
  107.  
  108. #**********************************************************************#
  109.  
  110. BEGIN
  111.  
  112. CONTROL IFEQ DEBUG,1;
  113. XTRACE("HWLP ") ;
  114. CONTROL FI;
  115.  
  116. #
  117.   STEP 1 INITIALIZE FUNCTION-COMPLETE FLAG AND SEE IF ANYTHING
  118.   TO DO
  119. #
  120. ABTADDR = ACBADDR;
  121. DONE = TRUE;
  122. P<ACB> = ACBADDR;
  123. WLADDR = ACBWLADR[0];
  124.  
  125. FOR TEMP=TEMP WHILE DONE # PREVIOUS WORKLIST ENTRY COMPLETED #
  126. AND ACBNWLE[0] NQ 0 # MORE NWL ENTRY TO PROCESS #
  127. AND HRL NQ 0 # NAM BUFFER LEVEL NOT ZERO #
  128. DO
  129. BEGIN # THERE IS WORK FOR HWLP TO DO #
  130. #
  131.   STEP 2 CHECK FOR VALID AIP HEADER WORD
  132. #
  133. P<NWLENTRY> = WLADDR;
  134. TEMP = NWLEBS[0];
  135. NEXTWLA = WLADDR + TEMP;
  136. IF NEXTWLA GR ACBWLLWA[0] OR TEMP LS LENGTHMIN
  137. THEN
  138. BEGIN
  139. ABTAPPF = XBADWCNE; # SET ABORT-APPLICATION FLAG #
  140. DONE = FALSE;
  141. END
  142. ELSE
  143. BEGIN
  144. IF NWLOP LS WLOPMIN OR NWLOP GR WLOPMAX
  145. THEN
  146. BEGIN
  147. ABTAPPF = XBADOP;
  148. DONE = FALSE;
  149. END
  150. ELSE
  151. BEGIN
  152. #
  153.   STEP 3 PROCESS OP-CODE FUNCTION
  154. #
  155. #
  156.   ********** BEGINNING OF CASE STATEMENT **********
  157. #
  158. GOTO NWLOPJT[NWLOP[0]];
  159. OP1: # PROCESS *NETPUT* #
  160. OP9: # PROCESS *NETPUTF* #
  161.  
  162. CONTROL IFEQ STAT,1;
  163. OTIME(STIME); # GET SYSTEM TIME BEFORE PROCESSING PUT #
  164. CONTROL FI;
  165.  
  166. HPPUT;
  167.  
  168. CONTROL IFEQ STAT,1;
  169. OTIME(ETIME); # GET SYSTEM TIME AFTER PROCESSING PUT #
  170. ST$NPU = ST$NPU + 1; # INCREMENT NUMBER OF PUT TYPE CALLS#
  171. STTEMP = EMILS[0] - SMILS[0]; # TIME SPENT IN HPPUT #
  172. ST$TPU = ST$TPU + STTEMP; # TOTAL TIME SPENT IN HPPUT #
  173. IF ST$LPU LS STTEMP
  174. THEN # FOUND LARGER TIME INTERVAL IN HPPUT #
  175. BEGIN
  176. ST$LPU = STTEMP; # NEW LARGEST TIME INTERVAL #
  177. END
  178. CONTROL FI;
  179.  
  180. GOTO CHECKFC;
  181. OP2: # PROCESS *NETGET* #
  182. OP3: # PROCESS *NETGETL* #
  183. OP8: # PROCESS *NETGETF* #
  184. OP10: # PROCESS *NETGTFL* #
  185.  
  186. CONTROL IFEQ STAT,1;
  187. OTIME(STIME); # GET SYSTEM TIME BEFORE PROCESSING GET #
  188. CONTROL FI;
  189.  
  190. HPGET;
  191.  
  192. CONTROL IFEQ STAT,1;
  193. OTIME(ETIME); # GET SYSTEM TIME AFTER PRCESSING GET #
  194. ST$NGE = ST$NGE + 1; # INCRE NUMBER OF GET TYPE CALLS #
  195. STTEMP = EMILS[0] - SMILS[0]; # TIME SPENT IN HPGET #
  196. ST$TGE = ST$TGE + STTEMP; # TOTAL TIME SPENT IN HPGET #
  197. IF ST$LGE LS STTEMP
  198. THEN # FOUND LARGER TIME INTERVAL IN HPGET #
  199. BEGIN
  200. ST$LGE = STTEMP; # NEW LARGEST TIME INTERVAL #
  201. END
  202. CONTROL FI;
  203.  
  204. GOTO CHECKFC;
  205. OP4: # PROCESS *NETGETSM* #
  206.  
  207. CONTROL IFEQ STAT,1;
  208. OTIME(STIME); # GET SYSTEM TIME BEFORE PROCESSING GETSM #
  209. CONTROL FI;
  210.  
  211. HPGETSM;
  212.  
  213. CONTROL IFEQ STAT,1;
  214. OTIME(ETIME); # GET SYSTEM TIME AFTER PROCESSING GETSM #
  215. ST$NGS = ST$NGS + 1; # INCRE NUMBER OF NETGETSM CALLS #
  216. STTEMP = EMILS[0] - SMILS[0]; # TIME SPENT IN HPGETSM #
  217. ST$TGS = ST$TGS + STTEMP; # TOTAL TIME SPENT IN HPGETSM #
  218. IF ST$LGS LS STTEMP
  219. THEN # FOUND LARGER TIME INTERVAL IN HPGETSM #
  220. BEGIN
  221. ST$LGS = STTEMP; # NEW LARGEST TIME INTERVAL #
  222. END
  223. CONTROL FI;
  224.  
  225. GOTO CHECKFC;
  226. OP5: # PROCESS *NETWAIT* #
  227.  
  228. CONTROL IFEQ STAT,1;
  229. OTIME(STIME); # GET SYS TIME BEFORE PROCESSING NETWAIT #
  230. CONTROL FI;
  231.  
  232. HPWAIT;
  233.  
  234. CONTROL IFEQ STAT,1;
  235. OTIME(ETIME); # GET SYSTEM TIME AFTER PROCESSING NETWAIT#
  236. ST$NWA = ST$NWA + 1; # INCRE NUMBER OF NETWAIT CALLS #
  237. STTEMP = EMILS[0] - SMILS[0]; # TIME SPENT IN HPWAIT #
  238. ST$TWA = ST$TWA + STTEMP; # TATAL TIME SPENT IN HPWAIT #
  239. IF ST$LWA LS STTEMP
  240. THEN # FOUND LARGER TIME INTERVAL IN HPWAIT #
  241. BEGIN
  242. ST$LWA = STTEMP; # NEW LARGEST TIME INTERVAL #
  243. END
  244. CONTROL FI;
  245.  
  246. GOTO CHECKFC;
  247. OP6: # NETON NOT ALLOWED HERE #
  248. OP7: # NETOFF NOT ALLOWED HERE #
  249. OP13: # BAD OPCODE RECEIVED FOR WORKLIST #
  250. OP15:
  251. OP16:
  252. OP17:
  253. DONE = FALSE;
  254. ABTAPPF = XBADOP;
  255. GOTO CHECKFC ;
  256. OP11:
  257. HPXFR ;
  258. GOTO CHECKFC ;
  259. OP12:
  260. GOTO CHECKFC ;
  261. OP14: # PROCESS GETMM WORKLIST #
  262. HPGETMM ;
  263. GOTO CHECKFC ;
  264. OP18: # PROCESS NETPUTQ OPCODE #
  265. HPPUTQ(NWLTLW[0],NWLPQN[0]) ;
  266. GOTO CHECKFC ;
  267. CHECKFC:
  268. #
  269.   ********** END OF CASE STATEMENT **********
  270. #
  271. #
  272.   STEP 4 CHECK IF LAST FUNCTION COMPLETED
  273. #
  274. P<ACB> = ACBADDR;# ACB MAY HAVE MOVED #
  275. IF DONE
  276. THEN # FUNCTION COMPLETED #
  277. BEGIN
  278. ACBNWLE[0] = ACBNWLE[0] - 1;
  279. WLADDR = NEXTWLA;
  280. ACBWLADR[0] = NEXTWLA;
  281. END
  282. END
  283. END
  284. END
  285.  
  286. IF HRL EQ 0 # NAM REACHED MAX FL #
  287. AND DONE # PREVIOUS NWL ENTRY PROCESSED #
  288. AND ACBNWLE[0] NQ 0 # MORE NWL ENTRY TO PROCESS #
  289. THEN
  290. BEGIN # SUSPEND NWL WORKLIST PROCESSING #
  291. TEMP = ACBAN[0]; # APPLICATION NUMBER #
  292. ATHRL0[TEMP] = TRUE; # SET NWL SUSPENDED AT HRL=0 #
  293. END
  294.  
  295. IF ATU[ACBAN[0]]
  296. THEN # DATA AVAIL WORD IN AIP NEEDS UPDATING #
  297. BEGIN # SUSPEND WORKLIST PROCESSING COMPLETION #
  298. DONE = FALSE; # TILL UPDATED #
  299. IF ATASBI[ACBAN[0]]
  300. THEN # APP SWAPPED OUT BY OS - SWAPIN ISSUED #
  301. BEGIN
  302. ATASBS[ACBAN[0]] = TRUE; # SET APP SWAPPED OUT BY OS FLAG #
  303. END
  304. END
  305. IF DONE # NWL PROCESSING COMPLETE #
  306. AND ACBNWLE[0] EQ 0
  307. THEN
  308. BEGIN
  309. IF ACBAWLADDR[0] NQ 0
  310. THEN # RETURN AWL/ CLEAR SHORT TERM CONNECTIONS #
  311. HPAWL;
  312. ELSE # CLEAN UP ACB #
  313. BEGIN
  314. HRELWWL;
  315. END
  316. IF (ACBAN[0] NQ 1) AND (ACBSMQ[0] GR MAXSUPMSG)
  317. THEN # IF A NON-NVF APP IS NOT PICKING UP QUEUED SUP MSGS #
  318. BEGIN
  319. ABTAPPF = X2MANYSM; # SET ABORT APPLICATION FLAG #
  320. END
  321. END
  322.  
  323. RETURN;
  324. END
  325. TERM
cdc/nos2.source/nam5871/hwlp.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator