User Tools

Site Tools


cdc:nos2.source:nam5871:hwraval

HWRAVAL

Table Of Contents

  • [00008] PROC HWRAVAL(ACBADR, CHECK)
  • [00065] PROC OSCCALL
  • [00066] PROC OSCHAPP
  • [00067] PROC OTIME
  • [00068] PROC XTRACE

Source Code

HWRAVAL.txt
  1. *DECK HWRAVAL
  2. USETEXT NIPDEF
  3. USETEXT ACB
  4. USETEXT AT
  5. USETEXT SCPCOM
  6. USETEXT STATTAB
  7. USETEXT SYSTIME
  8. PROC HWRAVAL(ACBADR, CHECK); # WRITE DATA AVAIABLE WORD #
  9.  
  10. *IF DEF,IMS
  11. #
  12. *1DC HWRAVAL
  13. *
  14. * 1. PROC NAME AUTHOR DATE.
  15. * HWRAVAL P.C.TAM 79/02/09
  16. *
  17. * 2. FUNCTIONAL DESCRIPTION.
  18. * WRITE DATA AVAILABLE WORD
  19. *
  20. * 3. METHOD USED.
  21. * IF APP NOT SWAPPED OUT,
  22. * SET UP SCP REQUEST, CALL OSCALL FOR SCP SERVICE.
  23. * IF RETURN CODE NOT ZERO,
  24. * SCHEDULE APP, SET ATU FLAG.
  25. *
  26. * 4. ENTRY PARAMETER.
  27. * ACBADR ADDRESS OF THE ACB OF APP TO WHOM
  28. * NIP HAS TO WRITE DATA AVAILABLE WORD
  29. * CHECK CHECK OR NOT CHECK OF ACB IN SWAPPED
  30. * OUT STATE
  31. *
  32. * 5. EXIT PARAMETER.
  33. * NONE.
  34. *
  35. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  36. * NIPDEF ACB SCPCOM PT AT
  37. * STATTAB
  38. *
  39. * 7. ROUTINES CALLED.
  40. * OSCHAPP SCHEDULE APP
  41. * OSCCALL SCP SERVICE REQUEST
  42. * OTIME GET SYSTEM RTIME
  43. * XTRACE TRACE PROCEDURE CALL
  44. *
  45. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT MESSAGES.
  46. * THIS PROCEDURE IS CALLED BY BDELINK,BLINK, AND XSACB.
  47. *
  48.  #
  49. *ENDIF
  50. #
  51.   INPUT PARAMETERS
  52. #
  53. ITEM
  54. ACBADR, # ACB ADDRESS #
  55. CHECK B; # CHECK OR NO CHECK FLAG #
  56. #
  57.   OUTPUT PARAMETERS
  58. #
  59. # NONE #
  60. #
  61.   EXTERNAL VARIABLES
  62. #
  63. XREF
  64. BEGIN
  65. PROC OSCCALL; # SCP REQUEST SERVICE #
  66. PROC OSCHAPP; # SCHEDULE APPLICATION #
  67. PROC OTIME; # GET SYSTEM RTIME #
  68. PROC XTRACE; # TRACE PROCEDURE CALLS #
  69. END
  70. #
  71.   LOCAL VARIABLES
  72. #
  73. ITEM
  74. RC, # REASON CODE #
  75. I; # TEMPORARY VARIABLE #
  76.  
  77. CONTROL IFEQ STAT,1;
  78. ARRAY STIME P(1); # RTIME BUFFER FOR STARTING TIME #
  79. BEGIN
  80. ITEM SMILS U(0,24,36); # STARTING TIME IN MILLESECONDS #
  81. END
  82. ARRAY ETIME P(1); # RTIME BUFFER FOR ENDING TIME #
  83. BEGIN
  84. ITEM EMILS U(0,24,36); # ENDING TIME IN MILLESECONDS #
  85. END
  86.  
  87. ITEM STTEMP; # TEMPORARY STATISTICS VARIABLE #
  88. CONTROL FI;
  89.  
  90.  
  91. # ******************************************************************* #
  92.  
  93. BEGIN
  94. CONTROL IFEQ DEBUG,1;
  95. XTRACE("HWRAV") ;
  96. CONTROL FI ;
  97.  
  98. CONTROL IFEQ STAT,1;
  99. OTIME(STIME); # GET SYSTEM TIME AT BEGINNING OF PROC #
  100. CONTROL FI;
  101.  
  102. P<ACB> = ACBADR ; # SET ACB ADDRESS #
  103. I = ACBAN[0]; # APPLICATION NUMBER #
  104. IF NOT ATNVFN[I] # NOT WAITING FOR NET/OFF/N #
  105. AND NOT ATNVFF[I] # NOT WAITING FOR FAIL/APPL/N #
  106. THEN
  107. BEGIN
  108. IF NOT CHECK # NO CHECK FOR ACB SWAPPED OUT STATE #
  109. OR (ATASBI[I] AND # SCP SWAPIN REQUEST HAS BEEN ISSUED AND #
  110. ACBSCPCB[0] NQ 0) # HAS COMPLETED #
  111. OR NOT (ATU[I] OR # NOT HWRAVAL DETECTED SWAPPED OUT APP #
  112. ATASBSO[I]) # NOT APPLICATION SWAPPED OUT #
  113. THEN # OKAY TO USE ACB FOR SF.WRITE SCP FUNCT #
  114. BEGIN # NEED TO MODIFY DATA AVAILABLE WORD #
  115. ACBSWAPWR[0] = ACBIASCP[0]; # SCP FUNCTION REQUEST WORD #
  116. P<SCPCALL> = LOC(ACBSWAPWR[0]);
  117. OSCCALL(SCPCALL);
  118. RC = ACBSCPRC[0]; # REPLY CODE #
  119. IF RC NQ 0
  120. THEN
  121. BEGIN
  122. ATU[I] = TRUE; # UPDATE DATA AVAILABLE WORD #
  123. OSCHAPP(ACBADR);
  124. END
  125. ELSE
  126. BEGIN # SUCCESSFUL UPDATE RC=0 #
  127. IF ATASBW[I] # APPLICATION IN NETWAIT STATE #
  128. THEN
  129. BEGIN # APPLICATION HAS TO BE AT CONTROL POINT #
  130. MSG$AN = I; # STORE AT INDEX IN GLOBAL MSG$AN #
  131. ATAMSG[I] = TRUE; # FLAG MESSAGE FOR APPLICATION #
  132. END
  133. END
  134. END
  135. ELSE
  136. ATU[I] = TRUE; # UPDATE DATA AVAILABLE FLAG #
  137. END
  138.  
  139. CONTROL IFEQ STAT,1;
  140. OTIME(ETIME); # GET SYSTEM TIME AT END OF PROC #
  141. ST$NDA = ST$NDA + 1; # INCREMENT NUMBER OF TIMES HWRAVAL CALLED#
  142. STTEMP = EMILS[0] - SMILS[0]; # TIME SPENT IN THIS ROUTINE #
  143. ST$TDA = ST$TDA + STTEMP; # TOTAL TIME SPENT IN THIS ROUTINE #
  144. IF ST$LDA LS STTEMP
  145. THEN # FOUND LARGER TIME INTERVAL IN ROUTINE #
  146. BEGIN
  147. ST$LDA = STTEMP; # NEW LARGEST TIME INTERVAL #
  148. END
  149. CONTROL FI;
  150.  
  151. RETURN; # RETURN TO CALLER #
  152. END
  153. TERM
cdc/nos2.source/nam5871/hwraval.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator