User Tools

Site Tools


ibm:vm370-lib:rscs:dmtgiv.assemble_src

DMTGIV Source

References

Source Listing

DMTGIV.ASSEMBLE.txt
  1. GIV TITLE 'DMTGIV (RSCS) VM/370 - RELEASE 6' 00001000
  2. *. 00002000
  3. * MODULE NAME - 00003000
  4. * 00004000
  5. * DMTGIV 00005000
  6. * 00006000
  7. * FUNCTION - 00007000
  8. * 00008000
  9. * DMTGIV IS A SUPERVISOR SERVICE ROUTINE WHICH ENQUEUES 00009000
  10. * GIVE REQUESTS FROM TASKS TO BE DELIVERED TO OTHER 00010000
  11. * TASKS BY DMTAKE. 00011000
  12. * 00012000
  13. * ATTRIBUTES - 00013000
  14. * 00014000
  15. * REUSABLE, NON-INTERRUPTABLE 00015000
  16. * 00016000
  17. * ENTRY POINTS - 00017000
  18. * 00018000
  19. * DMTGIV - ENQUEUE A GIVE REQUEST 00019000
  20. * 00020000
  21. * ENTRY CONDITIONS - 00021000
  22. * 00022000
  23. * GPR1 = GIVE TABLE ADDRESS IN TASK STORAGE 00023000
  24. * GPR14 = RETURN ADDRESS 00024000
  25. * GPR15 = ENTRY ADDRESS 00025000
  26. * 00026000
  27. * EXIT CONDITIONS - 00027000
  28. * 00028000
  29. * NORMAL - 00029000
  30. * 00030000
  31. * GPR15 = X'00' REQUEST SUCCESSFULLY ENQUEUED 00031000
  32. * (BUT NOT NECESSARILY DELIVERED) 00032000
  33. * 00033000
  34. * ERROR - 00034000
  35. * 00035000
  36. * GPR15 = > X'00' ERROR CODE ON RETURN FROM DMTQRQ 00036000
  37. * 00037000
  38. EJECT 00038000
  39. * 00039000
  40. * CALLS TO OTHER ROUTINES - 00040000
  41. * 00041000
  42. * DMTQRQ - TO RESERVE AND RELEASE SUP QUEUE ELEMENTS 00042000
  43. * DMTPST - TO NOTIFY A TASK OF REQUEST AVAILABILITY 00043000
  44. * 00044000
  45. * EXTERNAL REFERENCES - 00045000
  46. * 00046000
  47. * NONE 00047000
  48. * 00048000
  49. * TABLES / WORKAREAS - 00049000
  50. * 00050000
  51. * DMTVEC - SUPERVISOR COMMON AREA 00051000
  52. * TASK ELEMENT 00052000
  53. * GIVE ELEMENT 00053000
  54. * 00054000
  55. * REGISTER USAGE - 00055000
  56. * 00056000
  57. * GPR0 = CALLING PARAMETER (POST CODE TO DMTPST) 00057000
  58. * GPR1 = CALLING PARAMETER (TO DMTQRQ AND DMTPST) 00058000
  59. * GPR2 = SCRATCH 00059000
  60. * GPR3 = TASK ELEMENT POINTER, TASK SAVE AREA POINTER 00060000
  61. * GPR4 = GIVE ELEMENT POINTER 00061000
  62. * GPR5 = UNUSED 00062000
  63. * GPR6 = UNUSED 00063000
  64. * GPR7 = UNUSED 00064000
  65. * GPR8 = UNUSED 00065000
  66. * GPR9 = UNUSED 00066000
  67. * GPR10 = UNUSED 00067000
  68. * GPR11 = UNUSED 00068000
  69. * GPR12 = DMTGIV BASE REGISTER 00069000
  70. * GPR13 = TASK SAVE AREA POINTER 00070000
  71. * GPR14 = LINKAGE RETURN ADDRESS 00071000
  72. * GPR15 = LINKAGE ENTRY ADDRESS 00072000
  73. * 00073000
  74. * NOTES - 00074000
  75. * 00075000
  76. * REFER TO MODULE DMTAKE FOR A MORE COMPLETE UNDERSTANDING 00076000
  77. * OF THE FUNCTION OF THIS ROUTINE. 00077000
  78. * 00078000
  79. * OPERATION - 00079000
  80. * 00080000
  81. * 00081000
  82. * DMTGIV BEGINS PROCESSING BY SUSPENDING CALLING 00082000
  83. * TASK EXECUTION THROUGH THE FREEZE SVC FUNCTION. A 00083000
  84. * SUPERVISOR STATUS QUEUE ELEMENT IS GOTTEN THROUGH 00084000
  85. * A CALL TO DMTQRQ, A GIVE REQUEST ELEMENT IS 00085000
  86. * BUILT USING THE INFORMATION SUPPLIED BY THE 00086000
  87. * CALLING TASK, AND THE ELEMENT IS ENQUEUED ON THE 00087000
  88. * GIVE REQUEST QUEUE. THE ADDRESSED TASK IS LOCATED, 00088000
  89. * AND IF ITS REQUEST ARRIVAL SYNCH LOCK IS NOT 00089000
  90. * ALREADY POSTED, IT IS POSTED BY DMTGIV. CONTROL 00090000
  91. * IS RETURNED TO THE DISPATCHER. 00091000
  92. * 00092000
  93. * 00093000
  94. *. 00094000
  95. EJECT 00095000
  96. DMTGIV CSECT 00096000
  97. SPACE 00097000
  98. * ENTRY POINT FOR CALL TO DMTGIV ROUTINE 00098000
  99. SPACE 00099000
  100. FREEZE SAVE RESUME PSW AND GREGS FOR DISPATCH LATER 00100000
  101. SPACE 00101000
  102. LR R13,R14 REG.13 = SAVE AREA ADDRESS FOR DMTGIV 00102000
  103. USING TAREA,R13 DEFINE ADDRESSABILITY FOR CALLER'S S 00103000
  104. USING SVECTORS,0 GET SVECTORS ADDRESSABILTIY 00104000
  105. USING GIVEE,R4 GET GIVE ELEMENT ADDRESSABILTIY 00105000
  106. SPACE 00106000
  107. LA R12,0(R15) REG.12 = ENTRY ADDRESS FOR DMTGIV 00107000
  108. USING DMTGIV,R12 USE ENTRY ADDRESS AS BASE 00108000
  109. SPACE 00109000
  110. LA R3,GIVEQ-(GIVENEXT-GIVEE) INITIALIZE QUEUE SCAN POINTER 00110000
  111. GIVESCAN EQU * 00111000
  112. LR R4,R3 REG.4 = ADDR OF LAST LINK FIELD SCANNED 00112000
  113. ICM R3,B'1111',GIVENEXT REG 3 = ADDRESS OF NEXT GIVE ELEMENT 00113000
  114. BNZ GIVESCAN NOPE - KEEP LOOKING FOR THE LAST ELEMENT 00114000
  115. SPACE 00115000
  116. * LAST ELEMENT ADDRESS IN REG 4 -- ENQUEUE FIRST IN FIRST OUT 00116000
  117. SPACE 00117000
  118. LR R2,R1 SAVE ADDR OF GIVE TABLE IN REG.2 00118000
  119. SR R1,R1 CLEAR REG.1 FOR GET CALL TO SUP QUEUE MANAGER 00119000
  120. L R15,QREQ REG.15 = ENTRY ADDRESS FOR SUP QUEUE REQ 00120000
  121. BALR R14,R15 GET A FREE SUP QUEUE ELEMENT FOR NEW GIVE REQ 00121000
  122. LTR R15,R15 DID WE GET ONE O.K.? 00122000
  123. BNZ GIVEXIT EXIT WITH SUP QUEUE MGR'S RETURN CODE IF NOT 00123000
  124. ST R1,GIVENEXT CHAIN NEW ELEMENT TO END OF GIVE QUEUE 00124000
  125. DROP R4 00125000
  126. SPACE 00126000
  127. USING GIVEE,R1 00127000
  128. XC GIVENEXT(4),GIVENEXT CLEAR THE NEW ELEMENT LINK 00128000
  129. ST R2,GIVEADDR SET ADDRESS OF REQUEST INTO ELEMENT 00129000
  130. MVC GIVENAME(4),4(R2) GET RECEIVER'S NAME FROM REQUEST 00130000
  131. MVI GIVENID,X'00' CLEAR TAKER'S ID FIELD UNTIL TAKEN 00131000
  132. L R4,ACTIVE GET THE ACTIVE TASK ELEMENT 00132000
  133. MVC GIVERID(1),TASKID-TASKE(R4) MOVE SENDING TASK ID INTO EL 00133000
  134. ST R1,4(R2) SET NEW ELEMENT ADDRESS IN CALLER'S GIVE TABLE 00134000
  135. EJECT 00135000
  136. LA R3,TASKQ-(TASKNEXT-TASKE) INITIALIZE TASK QUEUE SCAN REG 00136000
  137. USING TASKE,R3 GET TASK ELEMENT ADDRESSABILITY 00137000
  138. GIVESNIF EQU * 00138000
  139. ICM R3,B'1111',TASKNEXT REG 3 = NEXT TASK TABLE IN QUEUE 00139000
  140. BZ GIVEDONE YEP - RECEIVING TASK NOT ACTIVE (YET?) 00140000
  141. CLC GIVENAME(4),TASKNAME IS THIS THE ADDRESSED TASK? 00141000
  142. BNE GIVESNIF KEEP SCANNING IF IT ISN'T 00142000
  143. SPACE 00143000
  144. DROP R3 00144000
  145. DROP R13 STOP USING CALLER'S TASK AREA 00145000
  146. USING TAREA,R3 AND START USING ADDRESSEE'S 00146000
  147. SPACE 00147000
  148. L R3,TASKSAVE-TASKE(R3) REG 3 = ADDRESS OF ADDRESSED TAS 00148000
  149. CLI TREQLOCK,X'00' IS HIS GIVE REQ SYNLOCK POSTED ALREADY? 00149000
  150. BNE GIVEDONE NO NEED TO POST IT AGAIN IF SO 00150000
  151. SR R0,R0 CLEAR REG.0 POST CODE FOR CALL TO POST 00151000
  152. LA R1,TREQLOCK REG.1 = ADDRESS OF TASK'S GIVE REQ SYNLOCK 00152000
  153. L R15,POSTREQ REG.15 = ADDR OF ENTRY TO POST ROUTINE 00153000
  154. BALR R14,R15 POST RECEIVING TASK'S SYNCH LOCK 00154000
  155. SPACE 00155000
  156. DROP R3 STOP USING ADDRESSEE'S TASK SAVE AREA DSECT 00156000
  157. USING TAREA,R13 AND RESUME USING CALLER'S TASK AREA 00157000
  158. SPACE 00158000
  159. GIVEDONE EQU * 00159000
  160. SR R15,R15 CLEAR RETURN CODE FOR RETURN 00160000
  161. SPACE 00161000
  162. GIVEXIT EQU * 00162000
  163. ST R15,TGREG15 SET RETURN CODE IN CALLER'S TASK SAVE AREA 00163000
  164. L R15,DISPATCH REG.15 = DISPATCHER ENTRY ADDRESS 00164000
  165. BALR R14,R15 GO BACK TO DISPATCHING TASKS 00165000
  166. EJECT 00166000
  167. COPY RSSEQU 00167000
  168. EJECT 00168000
  169. COPY SVECTORS 00169000
  170. EJECT 00170000
  171. COPY TAREA 00171000
  172. EJECT 00172000
  173. COPY TASKE 00173000
  174. EJECT 00174000
  175. COPY GIVEE 00175000
  176. END 00176000
ibm/vm370-lib/rscs/dmtgiv.assemble_src.txt ยท Last modified: 2023/08/06 13:39 by Site Administrator