User Tools

Site Tools


cdc:nos2.source:nam5871:hpwait

HPWAIT

Table Of Contents

  • [00010] PROC HPWAIT
  • [00063] PROC HRELWWL
  • [00064] PROC OSCCALL
  • [00065] PROC XTRACE

Source Code

HPWAIT.txt
  1. *DECK HPWAIT
  2. USETEXT NIPDEF
  3. USETEXT ACB
  4. USETEXT AT
  5. USETEXT APPSTAT
  6. USETEXT FLIST
  7. USETEXT NWLNTRY
  8. USETEXT PT
  9. USETEXT SYSTIME
  10. PROC HPWAIT; # PROCESS A *NET WAIT* #
  11.  
  12. STARTIMS;
  13. #
  14. *1DC HPWAIT
  15. *
  16. * 1. PROC NAME AUTHOR DATE
  17. * HPWAIT P. C. TAM 78/02/15
  18. *
  19. * 2. FUNCTIONAL DESCRIPTION.
  20. * THIS ROUTINE IS RESPONSIBLE FOR PROCESSING A *NET WAIT* WORK
  21. * LIST ENTRY.
  22. *
  23. * 3. METHOD USED.
  24. * IF NOT A FORCED NETWAIT AND DATA IS AVAILABLE,THEN UPDATE
  25. * WORKLIST POINTERS AND RETURN
  26. * COMPUTE WAIT TIME
  27. * SWAPOUT IF WAIT TIME IS GREATER THAN NTINE
  28. *
  29. * 4. ENTRY CONDITIONS.
  30. * ACBADDR ACB ADDRESS
  31. * WLADDR WORKLIST ADDRESS
  32. *
  33. * 5. EXIT CONDITIONS
  34. * DONE FALSE
  35. * FAILADDR ACBADDR IF SWAPOUT RESPONSE IS RCUCPGONE
  36. * ATASBF TRUE, FOR A FORCED NETWAIT
  37. * ATASBW TRUE, FOR NETWAIT WITHOUT SWAPOUT
  38. * ATASBR TRUE, FOR FORCED NETWAIT GR NTIME,DEFAULT=2
  39. *
  40. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  41. * ACB AT APPSTAT DUMPFLG FLIST
  42. * NIPDEF CONSTANT DEFINITIONS
  43. * NWLNTRY NWL ENTRY TEMPLATE
  44. * PT POINTER TABLE
  45. * SYSTIME SYSTEM TIME TABLE
  46. *
  47. * 7. ROUTINES CALLED.
  48. * MGETS ALLOCATE EMPTY BUFFER
  49. * MRELS RELEASE BUFFER SPACE
  50. * OSCCALL ISSUE SCP FUNCTION
  51. * RDUMP DUMP NIP-S FIELD LENGTH
  52. * XTRACE TRACES CALLS
  53. *
  54. * 8. DAYFILE MESSAGES. NONE
  55. *
  56.  #
  57. STOPIMS;
  58. #
  59.   EXTERNAL VARIABLES
  60. #
  61. XREF
  62. BEGIN
  63. PROC HRELWWL; # RELEASE NETWORK WORKLIST BUFFER #
  64. PROC OSCCALL; # ISSUE SYSTEM CONTROL POINT REQUEST #
  65. PROC XTRACE; # TRACE CALL #
  66. END
  67. #
  68.   LOCAL VARIABLES
  69. #
  70. ITEM APPNUM; # APPLICATION NUMBER #
  71. ARRAY FL$BUF S(3);
  72. BEGIN
  73. ITEM FL$WORD U(00,00,60);
  74. END
  75.  
  76. CONTROL EJECT;
  77.  
  78. BEGIN # HPWAIT #
  79.  
  80. CONTROL IFEQ DEBUG,1;
  81. XTRACE("HWAIT");
  82. CONTROL FI;
  83.  
  84. P<ACB> = ACBADDR;
  85. P<NWLENTRY> = WLADDR;
  86. APPNUM = ACBAN[0]; # APPLICATION NUMBER #
  87.  
  88. IF NOT NWLFLAG
  89. AND ( (ACBSMQ[0] NQ 0) # ASYNC SUP MSGS QUEUED #
  90. OR ( (ACBPDATA[0]) # DELIVERABLE DATA QUEUED #
  91. AND (NWLWTDEL[0]) ) # SWAPOUT IF NO DELIVERABLE DATA#
  92. OR ( (ACBBLKSQ[0] NQ 0) # DATA MSGS QUEUED #
  93. AND (NOT NWLWTDEL[0] ) ) ) # IGNORE DELIVERABLE DATA FLAG #
  94. THEN # NOT FORCED NETWAIT AND MESSAGE(S) QUEUED #
  95. DONE = TRUE; # DO NOT HONOR NETWAIT REQUEST #
  96.  
  97. ELSE #FORCED NETWAIT REQUEST OR NO MESSAGE QUEUED FOR APP #
  98. BEGIN
  99. IF NWLTIME LQ 1
  100. THEN # NETWAIT TIME MUST BE ONE SECOND OR MORE #
  101. BEGIN
  102. NWLTIME = 1;
  103. NWLFLAG = TRUE; # SET FORCED NETWAIT MODE #
  104. END
  105. ACBNTL[0] = RTSECS + NWLTIME; # SET NETWAIT TIMER IN ACB #
  106. ATASBF[APPNUM] = NWLFLAG; # SET FORCED NETWAIT MODE #
  107.  
  108. IF NWLTIME GR NTIME
  109. THEN # SWAP OUT APPLICATION #
  110. BEGIN
  111. ATASBW[APPNUM] = FALSE;
  112. P<FLHEAD> = LOC(FL$BUF); # FWA OF SCP REQUEST BLOCK #
  113. FLJOBID[0] = ACBJNWD[0]; # SET JOB ID #
  114. P<FLE> = LOC(FLFW[0]);
  115. FLFC[0] = SFSWPO; # SET SCP FUNCTION CODE #
  116. OSCCALL(FLE); # ISSUE SCP SWAPOUT REQUEST #
  117. IF FLRC[0] NQ 0
  118. AND FLRC[0] NQ RCSWAPPEDOUT
  119. THEN
  120. BEGIN
  121. IF FLRC[0] EQ RCUCPGONE
  122. OR FLRC[0] EQ RCSTCBAD
  123. THEN
  124. BEGIN
  125. FAILADR = ACBADDR;
  126. GOTO EXIT;
  127. END
  128. END
  129. ATASBR[APPNUM] = TRUE; # SET APPLICATION ROLLED OUT FLAG #
  130. END
  131.  
  132. ELSE # NO SWAP OUT ISSUED ON APPLICATION, SET WAIT FLAG #
  133. ATASBW[APPNUM] = TRUE;
  134.  
  135. DONE = FALSE; # DISABLE FURTHER WORKLIST ENTRY PROCESSING #
  136. ACBNWLE[0] = ACBNWLE[0] - 1; # DECREMENT WORKLIST ENTRY COUNT #
  137. IF ACBNWLE[0] EQ 0
  138. THEN # ALL WORKLIST ENTRY(S) PROCESSED #
  139. HRELWWL; # RELEASE WORKLIST BUFFER #
  140. ELSE # STILL KORE WORKLIST ENTRY TO PROCESS #
  141. ACBWLADR[0] = NEXTWLA;
  142. END
  143.  
  144. EXIT:
  145. RETURN;
  146. END # HPWAIT #
  147. TERM
cdc/nos2.source/nam5871/hpwait.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator