User Tools

Site Tools


cdc:nos2.source:nam5871:hpputq

HPPUTQ

Table Of Contents

  • [00011] PROC HPPUTQ(TXTLN,ENTRIES)
  • [00067] PROC BRLBLK
  • [00068] PROC HRELWWL
  • [00069] PROC MGETS
  • [00070] PROC MRELS
  • [00071] PROC OMOVE
  • [00072] PROC XTRACE
  • [00073] PROC OTIME

Source Code

HPPUTQ.txt
  1. *DECK HPPUTQ
  2. USETEXT NIPDEF
  3. USETEXT ACB
  4. USETEXT APPSTAT
  5. USETEXT DRHDR
  6. USETEXT FREETAB
  7. USETEXT MEM
  8. USETEXT NWLHEAD
  9. USETEXT NWLNTRY
  10. USETEXT STATTAB
  11. PROC HPPUTQ(TXTLN,ENTRIES) ;
  12.  
  13. STARTIMS;
  14. #
  15. *1DC HPPUTQ
  16. *
  17. * 1. PROC NAME AUTHOR DATE
  18. * HPPUTQ L.T.NGUYEN 88/06/10
  19. *
  20. * 2. FUNCTIONAL DESCRIPTION.
  21. * THIS ROUTINE IS RESPONSIBLE FOR PROCESSING THE PUTQ WORKLIST
  22. * FROM APPLICATION.
  23. *
  24. * 3. METHOD USED.
  25. * SET UP FOR READ
  26. * READ BLOCK
  27. * PUT OTHER ENTRIES INTO THE NEW LARGER WORKLIST INCLUDING THE
  28. * NETPUT TEXT
  29. *
  30. * 4. ENTRY PARAMETERS.
  31. * ACBADDR APPLICATION"S ACB
  32. * TXTLN LENGTH OF THE NETPUT TEXT
  33. * ENTRIES NUMBER OF ENTRIES IN THIS WORKLIST
  34. * WLADDR WORKLIST ENTRY
  35. *
  36. * 5. EXIT PARAMETERS.
  37. * DONE FALSE FOR THIS MULTIPLE WORKLIST WILL BE
  38. * PROCESSED LATER.
  39. * ACBWLFWA FWA OF NEW NWL
  40. * ACBWLLWA LWA OF NEW NWL
  41. * ACBNWLE NUMBER OF ENTRIES
  42. * WLADDR ADDRESS OF CURRENT WORKLIST ENTRY
  43. *
  44. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  45. * APPSTAT ACB DRHDR FREETAB
  46. * NIPDEF NWLHEAD NWLNTRY
  47. * STATTAB
  48. *
  49. * 7. ROUTINES CALLED.
  50. * BRLBLK XFER BLOCK FROM APP FL TO NIP FL
  51. * HRELWWL RELEASE WHOLE NWL
  52. * MGETS ALLOCATE EMPTY BUFFER
  53. * MRELS RELEASE BUFFER SPACE
  54. * OMOVE COPY INFORMATION
  55. * OTIME GET SYSTEM RTIME
  56. * XTRACE TRACES CALLS
  57. *
  58. * 8. DAYFILE MESSAGES. NONE
  59. * THIS PROCEDURE IS CALLED BY HWLP
  60. *
  61.  #
  62. STOPIMS;
  63. #
  64.   EXTERNAL VARIABLES
  65. #
  66. XREF BEGIN
  67. PROC BRLBLK; # READ BLOCK INTO NIP-S FL #
  68. PROC HRELWWL; # RELEASE WHOLE NWL #
  69. PROC MGETS; # ALLOCATE EMPTY BUFFER #
  70. PROC MRELS; # RELEASE UNUSED BUFFER SPACE #
  71. PROC OMOVE; # COPY INFORMATION #
  72. PROC XTRACE; # TRACE CALLS #
  73. PROC OTIME; # GET SYSTEM RTIME #
  74. END
  75. #
  76.   FORMAL PARAMETERS
  77. #
  78. ITEM TXTLN U; # LENGTH OF NETPUT TEXT IN CM WORDS #
  79. ITEM ENTRIES U ; # NUMBER OF ENTRIES IN THIS PUTQ #
  80. #
  81.   LOCAL VARIABLES
  82. #
  83. ITEM BUFADDR U; # FWA OF NEW NWL BUFFER #
  84. ITEM BUFSIZE U;
  85. ITEM EXTRAWORD U; # SET TO ONE IF FRAGMENTED GET/PUT #
  86.  
  87. CONTROL IFEQ STAT,1;
  88. ARRAY STIME P(1); # RTIME BUFFER FOR STARTING TIME #
  89. BEGIN
  90. ITEM SMILS U(0,24,36); # STARTING TIME IN MILLESECONDS #
  91. END
  92. ARRAY ETIME P(1); # RTIME BUFFER FOR ENDING TIME #
  93. BEGIN
  94. ITEM EMILS U(0,24,36); # ENDING TIME IN MILLESECONDS #
  95. END
  96.  
  97. ITEM STTEMP; # TEMPORARY STATISTICS VARIABLE #
  98. CONTROL FI;
  99.  
  100.  
  101. #**********************************************************************#
  102.  
  103. BEGIN
  104. CONTROL IFEQ DEBUG,1;
  105. XTRACE("HPPUQ") ;
  106. CONTROL FI;
  107.  
  108.  
  109. CONTROL IFEQ STAT,1;
  110. OTIME(STIME); # GET SYSTEM TIME AT BEGINNING OF PROC #
  111. CONTROL FI;
  112.  
  113. P<NWLENTRY> = WLADDR; # FWA OF WORKLIST ENTRY #
  114. P<ACB> = ACBADDR; # FWA OF ACB #
  115.  
  116. BUFSIZE = TXTLN + NWLHSIZE + 1 ;
  117. MGETS(BUFSIZE,BUFADDR,TRUE); # GET BUFFER FOR NEW NWL #
  118.  
  119. BRLBLK(BUFADDR+NWLHSIZE-ABHSIZE,TXTLN); # READ TEXT INTO NWL #
  120.  
  121. IF DONE
  122. THEN # READ UCP FUNCTION COMPLETED #
  123. BEGIN
  124. P<NWLHEADER> = BUFADDR ; # MOVE THE HEADER TO NEW PLACE #
  125. MNEW = P<NWLHEADER> ;
  126. MOLD = ACBWLFWA[0] ;
  127. MSIZE = NWLHSIZE ;
  128. OMOVE ;
  129.  
  130. NWLBS[0] = BUFSIZE ; # RESTORE BLOCK SIZE #
  131. NWLNE[0] = ENTRIES ;
  132. P<NWLENTRY> = BUFADDR + NWLHSIZE ;# FWA OF NWL ENTRY #
  133. NWLEID[0] = NWLEIDVALUE; # RESET NWL ENTRY ID #
  134.  
  135. HRELWWL; # RELEASE WHOLE PUTQ NWL #
  136.  
  137. ACBNWLE [0] = ENTRIES + 1 ; # INCLUDING THE PUTQ WL #
  138. ACBWLFWA[0] = BUFADDR;
  139. ACBWLADR[0] = BUFADDR + NWLHSIZE ; # CURRENT WORKLIST ADDRESS#
  140. ACBWLLWA[0] = BUFADDR + BUFSIZE - 1 ;
  141. NEXTWLA = BUFADDR + NWLHSIZE ; # NEXT ONE IS FIRST #
  142. END
  143.  
  144. ELSE # UCP SWAPPED OUT, READ FUNCTION UNABLE TO COMPLETE #
  145. BEGIN
  146. BLKBS[0] = TXTLN + NWLHSIZE ; # RESTORE BUFFER SIZE #
  147. MRELS(BUFADDR); # RELEASE NEW NWL BUFFER #
  148. END
  149.  
  150.  
  151. CONTROL IFEQ STAT,1;
  152. OTIME(ETIME); # GET SYSTEM TIME AT END OF PROCEDURE #
  153. ST$NHR = ST$NHR + 1; # INCRMNT NUMBER OF TIMES HPPUTQ CALLD #
  154. STTEMP = EMILS[0] - SMILS[0]; # TIME SPENT IN THIS ROUTINE #
  155. ST$THR = ST$THR + STTEMP; # TOTAL TIME SPENT IN THIS ROUTINE #
  156. IF ST$LHR LS STTEMP
  157. THEN # FOUND LARGER TIME INTERVAL IN ROUTINE #
  158. BEGIN
  159. ST$LHR = STTEMP; # NEW LARGEST TIME INTERVAL #
  160. END
  161. CONTROL FI;
  162.  
  163. RETURN;
  164. END
  165. TERM
cdc/nos2.source/nam5871/hpputq.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator