User Tools

Site Tools


ibm:vm370-lib:cp:dmklok.assemble_src

DMKLOK Source

References

Source Listing

DMKLOK.ASSEMBLE.txt
  1. LOK TITLE 'DMKLOK (CP) VM/370 - RELEASE 6' 00001000
  2. ISEQ 73,80 00002000
  3. * MODULE NAME - 00003000
  4. * DMKLOK 00004000
  5. * 00005000
  6. * FUNCTION - 00006000
  7. * THE FUNCTION OF THIS ROUTINE IS TO PROVIDE A CENTRALIZED 00007000
  8. * PLACE FOR ALL LOCKING MANIPULATIONS. ALL LOCKING FUNCTIONS 00008000
  9. * REQUIRED WHEN A LOCK IS NOT OBTAINED OR RELEASED ON THE 00009000
  10. * FIRST ATTEMPT ARE DIRECTED TO THIS MODULE. THIS ROUTINE 00010000
  11. * WILL ALSO SERVE AS A CENTRAL SPIN FUNCTION FOR THE SYSTEM. 00011000
  12. * ALL OBTAIN REQUESTS FOR THE VMBLOK LOCK WILL BE 00012000
  13. * DIRECTED TO THIS MODULE. 00013000
  14. * 00014000
  15. * ATTRIBUTES - 00015000
  16. * RESIDENT, BALR CALLED 00016000
  17. * 00017000
  18. * ENTRY POINTS - 00018000
  19. * DMKLOKDF - PROCESS AN OBTAIN, DEFER LOCK REQUEST 00019000
  20. * 00020000
  21. * DMKLOKVM - PROCESS AN OBTAIN, DEFER REQUEST FOR VMBLOK 00021000
  22. * 00022000
  23. * DMKLOKSP - PROCESS AN OBTAIN, SPIN LOCK REQUEST. 00023000
  24. * 00024000
  25. * DMKLOKPS - PROCESSOR SPIN ROUTINE. 00025000
  26. * 00026000
  27. * DMKLOKSW - PROCESS AN OBTAIN AND RELEASE REQUEST FOR VMBLOK 00027000
  28. * REQUESTED BY SWTCHVM MACRO 00028000
  29. * 00029000
  30. * ENTRY CONDITIONS - 00030000
  31. * GPR0 - PROCESSOR ADDRESS 00031000
  32. * GPR1 - ADDRESS OF LOCKWORD 00032000
  33. * GPR14 - RETURN ADDRESS 00033000
  34. * GPR15 - ENTRY POINT ADDRESS 00034000
  35. * 00035000
  36. * EXIT CONDITIONS - 00036000
  37. * NORMAL - CONDITION CODE SET 00037000
  38. * CC=0 LOCK OBTAINED 00038000
  39. * CC=1 LOCK HELD BY OTHER PROCESSOR 00039000
  40. * 00040000
  41. * ERROR - SYSTEM ABEND 00041000
  42. * LOK001 - AN OBTAIN REQUEST MADE FOR LOCK ALREADY 00042000
  43. * HELD BY THE REQUESTING PROCESSOR. 00043000
  44. * CVT001 - STCK FAILED. 00044000
  45. * 00045000
  46. * CALLS TO OTHER ROUTINES - 00046000
  47. * DMKVMASW - TO FLIP SHARED SYSTEM SEGMENT POINTERS 00047000
  48. * DMKCVTAB - ABEND IF STCK FAILS 00048000
  49. * DMKSTKSW - STACK A PRIORITY CPEXBLOK 00049500
  50. * 00051000
  51. * EXTERNAL REFERENCES - 00052000
  52. * LOCK MACRO REFERENCES: 00053000
  53. * PSA- 00054000
  54. * LPUADDR,LPUADDRX -LOGICAL PROCESSOR ADDRESS 00055000
  55. * LOCKSAV -4 WORD SAVE AREA FOR REGS 14 - 1 00056000
  56. * 00057000
  57. * DMKLOK EXTERNAL REFERENCES - 00058000
  58. * PSA- 00059000
  59. * CPSYSLK - INDICATOR THAT A PROCESSOR IS SPINNING 00060000
  60. * ON SYSTEM LOCK. 00061000
  61. * 00062000
  62. * CPLOKFL - INDICATOR THAT DMKLOK HAS OPENED WINDOW 00063000
  63. * BUT DOES NOT EXPECT RETURN ON INTERRUPT. 00064000
  64. * DMKEXTSL MUST CLEAN UP FOR DMKLOK. 00065000
  65. * DMKLOKSI, CPSYSLK, AND CPLOKFL MUST BE 00066000
  66. * CLEARED. 00067000
  67. * 00068000
  68. * TABLES/WORKAREAS - 00069000
  69. * LOKSAVE - DMKLOK SAVE AREA FOR REGS UPON ENTRY 00070000
  70. * LOKSAV2 - DMKLOKSW SAVE AREA FOR REGS UPON ENTRY 00071000
  71. * 00072000
  72. * MACROS - 00073000
  73. * TRACE - TRACE ALL SPIN CONDITIONS 00074000
  74. * ABEND - TERMINATE THE SYSTEM IN ERROR SITUATIONS. 00075000
  75. * CHARGE - SWITCH THE TIMER 00076000
  76. * 00077000
  77. * COPY FILES - 00078000
  78. * PSA - 00079000
  79. * CPEXBLOK - 00080000
  80. * VMBLOK - 00081000
  81. * 00082000
  82. * REGISTER USAGE - 00083000
  83. * GPR0 - PROCESSOR ADDRESS 00084000
  84. * GPR1 - LOCKWORD ADDRESS 00085000
  85. * GPR2 - 00086000
  86. * GPR3 - 00087000
  87. * GPR4 - 00088000
  88. * GPR5 - 00089000
  89. * GPR6 - 00090000
  90. * GPR7 - 00091000
  91. * GPR8 - 00092000
  92. * GPR9 - 00093000
  93. * GPR10- 00094000
  94. * GPR11- VMBLOK ADDRESS 00095000
  95. * GPR12- BASE REG 00096000
  96. * GPR13- 00097000
  97. * GPR14- 00098000
  98. * GPR15- 00099000
  99. * 00100000
  100. * OPERATION - 00101000
  101. * SEE ENTRY POINT PROLOGUES 00102000
  102. * 00103000
  103. * ERROR MESSAGES - 00104000
  104. * NONE. 00105000
  105. * 00106000
  106. EJECT 00107000
  107. COPY OPTIONS @V407510 00108000
  108. COPY LOCAL OPTIONS @V407510 00109000
  109. EJECT 00110000
  110. DMKLOK CSECT 00111000
  111. SPACE 3 @V407510 00112000
  112. ENTRY DMKLOKDF @V407510 00113000
  113. ENTRY DMKLOKVM @V407510 00114000
  114. ENTRY DMKLOKSP @V407510 00115000
  115. ENTRY DMKLOKPS @V407510 00116000
  116. ENTRY DMKLOKSW @V407510 00117000
  117. ENTRY DMKLOKSY @V407510 00118000
  118. ENTRY DMKLOKFR @V407510 00119000
  119. ENTRY DMKLOKRL @V407510 00120000
  120. ENTRY DMKLOKTR @V407510 00121000
  121. ENTRY DMKLOKDS @V407510 00122000
  122. ENTRY DMKLOKCT @V407510 00123000
  123. ENTRY DMKLOKSI @V407510 00124000
  124. SPACE 00125000
  125. EXTRN DMKVMASW SWITCH SEGMENT POINTERS @V407510 00126000
  126. EXTRN DMKCVTAB ABEND CVT001 @V407510 00127000
  127. EXTRN DMKSTKSW STACK A PRIORITY CPEXBLOK @VA07402 00128500
  128. EXTRN DMKDSPRU @VA09257 00128600
  129. SPACE 00130000
  130. USING PSA,0 @V407510 00131000
  131. USING VMBLOK,R11 @V407510 00132000
  132. USING LOCKWORD,R1 @V407510 00133000
  133. EJECT 00134000
  134. * SUBROUTINE NAME - 00135000
  135. * DMKLOKDF 00136000
  136. * 00137000
  137. * FUNCTION - 00138000
  138. * THE FUNCTION OF THIS ENTRY POINT IS TO HANDLE THE OBTAIN, 00139000
  139. * SPIN=NO REQUEST FOR A LOCK AND THE ATTEMPT TO OBTAIN THE 00140000
  140. * LOCK FAILED. 00141000
  141. * 00142000
  142. * MACRO CALL FORMAT - 00143000
  143. * LOCK OBTAIN,TYPE=SYS,SPIN=NO 00144000
  144. * LOCK OBTAIN,TYPE=VMBLOK,SPIN=NO,OPTION=NOUPDT 00145000
  145. * LOCK OBTAIN,TYPE=SVMBLOK,SPIN=NO,OPTION=NOUPDT 00146000
  146. * 00147000
  147. * ENTRY CONDITIONS - 00148000
  148. * GPR0 - PROCESSOR ADDRESS 00149000
  149. * GPR1 - LOCKWORD ADDRESS 00150000
  150. * GPR14- RETURN ADDRESS 00151000
  151. * GPR15- ENTRY POINT ADDRESS 00152000
  152. * 00153000
  153. * EXIT CONDITIONS - 00154000
  154. * NORMAL - 00155000
  155. * CONDITION CODE 1 - LOCK HELD BY OTHER PROCESSOR 00156000
  156. * 00157000
  157. * ERROR - 00158000
  158. * LOK001 ABEND - LOCK ALREADY HELD BY REQUESTING 00159000
  159. * PROCESSOR 00160000
  160. * 00161000
  161. * REGISTER USAGE - 00162000
  162. * SEE MAIN PROLOGUE 00163000
  163. * 00164000
  164. * OPERATION - 00165000
  165. * 1. IF LOCK ALREADY HELD, ABEND LOK001 00166000
  166. * 2. IF LOCK NOT ALREADY HELD, SET CC=1 00167000
  167. * 3. RETURN TO CALLER. 00168000
  168. * 00169000
  169. DMKLOKDF DS 0H DEFER OBTAIN ENTRY POINT @V407510 00170000
  170. USING *,R15 SET UP TEMPORARY ADDRESSABILITY @V407510 00171000
  171. CH R0,LKPROCA LOCK ALREADY HELD? @V407510 00184000
  172. BNE VALIDRQ NO, OTHER PROCESSOR OWNS LOCK @V407510 00185000
  173. LOKAB1 DS 0H ABEND LOK01 @V407510 00186000
  174. ABEND 01 ABEND LOK01, LOCK ALREADY HELD @V407510 00187000
  175. VALIDRQ DS 0H UPDATE COUNTER AND SET @V407510 00188000
  176. * CONDITION CODE @V407510 00189000
  177. C R1,=A(DMKLOKSY) REQUEST FOR SYSTEM LOCK? @V407510 00190000
  178. BE UPDSYSCT YES, UPDATE SYSTEM COUNTER @V407510 00191000
  179. L R1,LOKVMCT COUNT OF VMBLOK DEFERS @VA08310 00192100
  180. AL R1,F1 PLUS ONE @VA08310 00192200
  181. ST R1,LOKVMCT @VA08310 00192300
  182. LCR R0,R0 SET CC=1 @VA08310 00192400
  183. BR R14 EXIT @VA08310 00192500
  184. UPDSYSCT DS 0H @V407510 00200000
  185. L R1,LOKSYSCT COUNT OF SUPVRLOCK DEFERS @VA08310 00201100
  186. AL R1,F1 PLUS ONE @VA08310 00201200
  187. ST R1,LOKSYSCT @VA08310 00201300
  188. LCR R0,R0 SET CC=1 @VA08310 00201400
  189. BR R14 EXIT @VA08310 00201500
  190. EJECT 00203000
  191. * SUBROUTINE NAME - 00204000
  192. * DMKLOKVM 00205000
  193. * 00206000
  194. * FUNCTION - 00207000
  195. * THE FUNCTION OF THIS ENTRY POINT IS TO HANDLE THE OBTAIN, 00208000
  196. * SPIN=NO REQUEST FOR A VMBLOK LOCK. 00209000
  197. * 00210000
  198. * MACRO CALL FORMAT - 00211000
  199. * LOCK OBTAIN,TYPE=VMBLOK,SPIN=NO 00212000
  200. * 00213000
  201. * ENTRY CONDITIONS - 00214000
  202. * GPR0 - PROCESSOR ADDRESS 00215000
  203. * GPR1 - VMBLOK ADDRESS 00216000
  204. * GPR14- RETURN ADDRESS 00217000
  205. * GPR15- ENTRY POINT ADDRESS 00218000
  206. * 00219000
  207. * EXIT CONDITIONS - 00220000
  208. * NORMAL - 00221000
  209. * CONDITION CODE 0 - LOCK OBTAINED 00222000
  210. * CONDITION CODE 1 - LOCK HELD BY OTHER PROCESSOR 00223000
  211. * 00224000
  212. * ERROR - 00225000
  213. * LOK001 ABEND - LOCK ALREADY HELD BY REQUESTING 00226000
  214. * PROCESSOR 00227000
  215. * 00228000
  216. * REGISTER USAGE - 00229000
  217. * SEE MAIN PROLOGUE 00230000
  218. * 00231000
  219. * OPERATION - 00232000
  220. * 1. SAVE REGISTERS 00233000
  221. * 2. ATTEMPT TO OBTAIN LOCK 00234000
  222. * 3. IF LOCK OBTAINED AND VIRTUAL MACHINE NOT USING 00235000
  223. * SHARED SYSTEMS OR VIRTUAL MACHINE WAS LAST 00236000
  224. * DISPATCHED ON THIS PROCESSOR, SET CC=0 AND 00237000
  225. * GO TO STEP 8. 00238000
  226. * 4. IF LOCK OBTAINED AND VIRTUAL MACHINE IS USING 00239000
  227. * SHARED SYSTEMS AND WAS NOT LAST DISPATCHED ON 00240000
  228. * THIS PROCESSOR, CALL DMKVMASW TO FLIP SHARED 00241000
  229. * SEGMENT POINTERS, SET CC=0, AND GO TO STEP 8. 00242000
  230. * 5. IF LOCK ALREADY HELD, ABEND LOK001 00243000
  231. * 6. IF LOCK NOT ALREADY HELD, SET CC=1, AND 00244000
  232. * GO TO STEP 8. 00245000
  233. * 7. RESTORE REGISTERS AND RETURN TO CALLER 00246000
  234. * 00247000
  235. DMKLOKVM DS 0H VMBLOK OBTAIN ENTRY POINT @V407510 00248000
  236. USING *,R15 SET UP TEMPORARY ADDRESSABILITY @V407510 00249000
  237. ST R14,LOKSAVE+14*4 SAVE R14 @VA08310 00250100
  238. LH R0,LPUADDR LOAD PROCESSOR ADDRESS @VA08310 00250200
  239. DROP R11 SWITCH VMBLOK BASE @VA08310 00250300
  240. USING VMBLOK,R1 @VA08310 00250400
  241. SR R14,R14 CLEAR FOR CS INSTRUCTION @VA08310 00250500
  242. C R14,VMLOCK LOCK AVAILABLE? @VA08310 00250600
  243. BNE LOKDF NO @VA08310 00250700
  244. CS R14,R0,VMLOCK TRY FOR LOCK @VA08310 00250800
  245. BZ LOKVM1 OBTAINED LOCK @VA08310 00250900
  246. LOKDF DS 0H COULD NOT OBTAIN LOCK @VA08310 00251000
  247. CH R0,VMLOCK+(LKPROCA-LKLOCK) DO WE HOLD LOCK @VA08310 00251100
  248. BNE LOKDF2 NO @VA08310 00251200
  249. ST R15,LOKSAVE+15*4 SAVE R15 IN LOKSAVE @VA09066 00251250
  250. ABEND 1 THIS PROCESSOR OWNS LOCK @VA08310 00251300
  251. LOKDF2 DS 0H @VA08310 00251400
  252. L R14,LOKVMCT VMBLOK DEFER TOTAL @VA08310 00251500
  253. AL R14,F1 PLUS ONE @VA08310 00251600
  254. ST R14,LOKVMCT @VA08310 00251700
  255. L R14,LOKSAVE+14*4 RESTORE R14 @VA08310 00251800
  256. LCR R0,R0 SET CC=1 @VA08310 00251900
  257. BR 14 EXIT @VA08310 00252000
  258. LOKVM1 DS 0H @VA08310 00252100
  259. ST R12,VMLOCKER SAVE R12 OF CALLER FOR DEBUGGING @VA08310 00252200
  260. TM VMOSTAT,VMSHR RUNNING SHARED SEGMENTS @VA08310 00252300
  261. BZ LOKCC0 NO @VA08310 00252400
  262. CLC VMSHRPRC,LPUADDR+1 SHARED SEGS CORRECT? @VA08310 00252500
  263. BE LOKCC0 YES @VA08310 00252600
  264. LR R0,R11 SAVE CALLER'S R11 @VA08310 00252700
  265. LR R11,R1 SET R11 FOR CALL @VA08310 00252800
  266. CALL DMKVMASW ADJUST SEGMENT TABLE @VA08310 00252900
  267. LR R11,R0 RESTORE CALLER'S R11 @VA08310 00253000
  268. LOKCC0 SR R0,R0 SET CC=0 @VA08310 00253100
  269. L R14,LOKSAVE+14*4 RESTORE R14 @VA08310 00253200
  270. BR R14 EXIT @VA08310 00253300
  271. DROP R1 RESTORE VMBLOK BASE @VA08310 00253400
  272. USING VMBLOK,R11 @VA08310 00253500
  273. USING LOCKWORD,R1 RESTORE LOCKWORD BASE @VA08310 00253600
  274. SPACE 1 00253700
  275. SETCC0 DS 0H @V407510 00272000
  276. SR R0,R0 SET CONDITION CODE TO ZERO @V407510 00273000
  277. LOKEXIT DS 0H COMMON EXIT POINT @V407510 00274000
  278. LM R0,R15,LOKSAVE RESTORE REGISTERS @V407510 00275000
  279. BR R14 RETURN TO CALLER @V407510 00276000
  280. EJECT 00277000
  281. * SUBROUTINE NAME - 00278000
  282. * DMKLOKSW 00279000
  283. * 00280000
  284. * FUNCTION - 00281000
  285. * THE FUNCTION OF THIS ENTRY POINT IS TO HANDLE THE RELEASE 00282000
  286. * AND OBTAIN REQUEST FOR VMBLOKS SPECIFIED BY SWTCHVM MACRO 00283000
  287. * 00284000
  288. * MACRO CALL FORMAT - 00285000
  289. * SWTCHVM 00286000
  290. * SWTCHVM UNLOCK 00287000
  291. * SWTCHVM STAY 00288000
  292. * SWTCHVM NOUPDT 00289000
  293. * SWTCHVM OPT=(STAY,NOUPDT) 00290000
  294. * 00291000
  295. * ENTRY CONDITIONS - 00292000
  296. * GPR0 - OPTION BYTE 00293000
  297. * GPR1 - VMBLOK ADDRESS TO BE LOCKED 00294000
  298. * GPR11- VMBLOK ADDRESS TO BE UNLOCKED 00295000
  299. * GPR14- RETURN ADDRESS 00296000
  300. * GPR15- ENTRY POINT ADDRESS 00297000
  301. * SYSTEM LOCK REQUIRED 00297005
  302. * 00298000
  303. * EXIT CONDITIONS - 00299000
  304. * NORMAL - 00300000
  305. * SWITCH OF VMBLOKS MADE, R11 POINTING TO OLD R1 00301000
  306. * 00302000
  307. * CPEXBLOK STACKED TO GIVE CONTROL TO RETURN ADDRESS 00303000
  308. * 00304000
  309. * ERROR - 00305000
  310. * LOK003 ABEND - LOCK NOT HELD BY REQUESTING 00306000
  311. * PROCESSOR 00307000
  312. * 00308000
  313. * REGISTER USAGE - 00309000
  314. * SEE MAIN PROLOGUE 00310000
  315. * 00311000
  316. * OPERATION - 00312000
  317. * 1. SAVE REGISTERS 00313000
  318. * 2. IF SVMUNLOK SPECIFIED OR R1 IS LASTUSER OR 00314000
  319. * R1 IS ASYSVM, GO TO STEP 7. 00315000
  320. * 3. IF R1 AND R11 ARE THE SAME, RETURN TO CALLER. 00316000
  321. * 4. TRY TO OBTAIN LOCK FOR R1 USER 00317000
  322. * 5. IF LOCK OBTAINED BUT DEFERRED TASK PENDING, 00318000
  323. * RELEASE LOCK AND GO TO STEP 11 00319000
  324. * 6. IF LOCK OBTAINED, CALL DMKVMASW IF NECESSARY 00320000
  325. * 7. SWITCH THE TIMER. 00321000
  326. * 8. IF R11 IS LASTUSER OR ASYSVM, RETURN TO CALLER. 00322000
  327. * 9. RELEASE LOCK FOR R11. 00323000
  328. * 10. RETURN TO CALLER. 00324000
  329. * 11. OBTAIN STORAGE FOR CPEXBLOK AND SET UP TO GIVE 00325000
  330. * CONTROL TO RETURN ADDRESS. 00326000
  331. * 12. STACK CPEXBLOK 00327000
  332. * 13 GO TO LOCKED ENTRY OF DISPATCHER- DMKDSPCH 00328000
  333. * 00329000
  334. DMKLOKSW DS 0H SWITCH VMBLOK ENTRY POINT @V407510 00330000
  335. USING *,R15 SET UP TEMPORARY ADDRESSABILITY @V407510 00331000
  336. STM R0,R15,LOKSAV2 SAVE REGS IN SWTCHVM SAVE AREA @V4M0193 00332000
  337. L R12,LOKBASE LOAD COMMON BASE REGISTER @V407510 00333000
  338. DROP R15 DROP TEMPORARY BASE REG @V407510 00334000
  339. USING DMKLOK,R12 SET UP COMMON BASE REG @V407510 00335000
  340. TM LOKSAV2+RG0B3,SVMUNLOK UNLOCK SPECIFIED? @V4M0193 00336000
  341. BO NOVMA YES, ONLY UNLOCK R11 @V407510 00337000
  342. CR R1,R11 SAME VMBLOKS SPECIFIED? @V407510 00338000
  343. BE LKSWEXIT YES, RETURN TO CALLER @V4M0193 00339000
  344. C R1,LASTUSER R1 = LASTUSER? @V407510 00340000
  345. BE NOVMA YES, UNLOCK CURRENT R11 @V407510 00341000
  346. C R1,ASYSVM R1 = SYSTEM VMBLOK? @V407510 00342000
  347. BE NOVMA YES, UNLOCK CURRENT R11 @V407510 00343000
  348. LH R0,LPUADDR GET CURRENT PROCESSOR ADDRESS @V407510 00344000
  349. SLR R14,R14 CLEAR REG FOR C&S @V407510 00345000
  350. C R14,VMLOCK-VMBLOK(,R1) LOCK AVAILABLE? @V4M0173 00346000
  351. BNE STACK NO, STACK CPEXBLOK @V4M0173 00347000
  352. TM VMPEND-VMBLOK(R1),VMDEFSTK DEFERRED TASK? @V4M0173 00348000
  353. BO STACK YES, STACK A CPEXBLOK @VA07906 00349100
  354. CS R14,R0,VMLOCK-VMBLOK(R1) TRY TO OBTAIN LOCK @V407510 00350000
  355. BNZ STACK UNSUCCESSFUL, STACK CPEXBLOK @V407510 00351000
  356. TM VMPEND-VMBLOK(R1),VMDEFSTK DEFERRED TASK ? @V407510 00352000
  357. BNO UPDATE NO, CHECK FOR UPDATE @V407510 00353000
  358. ST R14,VMLOCK-VMBLOK(,R1) FREE LOCK @V4M0173 00354000
  359. STACK DS 0H STACK CPEXBLOK, LOCK IN USE @V407510 00355000
  360. C R0,VMLOCK-VMBLOK(R1) LOCK ALREADY HELD? @V4M0231 00356000
  361. BE LOKAB1 YES, ABEND LOK001 @V4M0231 00357000
  362. LA R0,CPEXSIZE GET SIZE OF CPEXBLOK @V407510 00358000
  363. CALL DMKFREE GET STORAGE FOR CPEXBLOK @V407510 00359000
  364. USING CPEXBLOK,R6 SET UP ADDRESSABILITY @V407510 00360000
  365. LR R6,R1 SET UP FOR CPEXBLOK @V407510 00361000
  366. MVC CPEXREGS(RGLN),LOKSAV2 STORE REGS IN CPEXBLOK @V4M0193 00362000
  367. L R2,CPEXR1 GET OLD REG 1 @V407510 00363000
  368. ST R2,CPEXR11 MAKE OLD R1 NEW R11 @V407510 00364000
  369. L R2,CPEXR14 GET OLD R14 @V407510 00365000
  370. ST R2,CPEXADD RETURN TO CALLER WHEN CPEXBLOK @V407510 00366000
  371. * IS UNSTACKED @V407510 00367000
  372. CALL DMKSTKSW STACK A PRIORITY CPEXBLOK @VA07402 00367100
  373. TM LOKSAV2+RG0B3,SVMSTAY STAY ON THIS PROCESSOR? @V4M0193 00368000
  374. BNO STKCP NO, RESET PROCESSOR ID @VA07402 00369100
  375. MVC CPEXPROC,LPUADDR YES, RESET ID TO THIS PROCESSOR@VA07402 00369600
  376. B DSPXT EXIT TO DISPATCHER @V407510 00371000
  377. STKCP DS 0H STACK FOR ANY PROCESSOR @V407510 00372000
  378. XC CPEXPROC,CPEXPROC ZERO PROCESSOR ID @VA07402 00373100
  379. DSPXT DS 0H DISPATCHER EXIT @V407510 00374000
  380. L R15,PREFIXB ACCESS OTHER PSA @VA09257 00374100
  381. TM XCPEND-PSA(R15),XCDISP DISPATCH PENDING @VA09257 00374200
  382. BZ DSPXT2 NO @VA09257 00374300
  383. LOCK RELEASE,TYPE=SYS YES, RELEASE SUPV LOCK @VA09257 00374400
  384. GOTO DMKDSPRU UNLOCKED ENTRY @VA09257 00374500
  385. DSPXT2 DS 0H @VA09257 00374600
  386. GOTO DMKDSPCH GO TO LOCKED ENTRY OF DMKDSP @V407510 00375000
  387. DROP R6 CPEXBLOK NO LONGER NEEDED @V407510 00376000
  388. UPDATE DS 0H CHECK UPDATE OPTION @V407510 00377000
  389. L R14,LOKSAV2+REG12 GET R12 VALUE OF CALLER @V4M0193 00378000
  390. ST R14,VMLOCKER SAVE R12 VALUE @V4M0193 00379000
  391. ST R14,VMLOCKER-VMBLOK(R1) SAVE R12 VALUE @VA08379 00379010
  392. TM LOKSAV2+RG0B3,SVMNOUPD NOUPDATE SPECIFIED? @V4M0193 00380000
  393. BO NOVMA YES,SKIP CALL TO DMKVMASW @VA09782 00381050
  394. LR R11,R1 SET UP R11 FOR DMKVMA @V407510 00382000
  395. TM VMOSTAT,VMSHR RUNNING SHARED SYSTEMS? @V407510 00383000
  396. BZ SWITCH NO, SKIP CALL TO VMA @V407510 00384000
  397. CLC VMSHRPRC,LPUADDR+ONE POINTING TO CURRENT @V407510 00385000
  398. * PROCESSOR SEGMENT TABLES? @V407510 00386000
  399. BE SWITCH YES, SKIP CALL TO DMKVMA @V407510 00387000
  400. CALL DMKVMASW NO, CALL DMKVMA TO SET UP @V407510 00388000
  401. * POINTERS FOR CURRENT PROCESSOR @V407510 00389000
  402. SWITCH DS 0H RESTORE R11 TO INPUT VALUE @V407510 00390000
  403. L R11,LOKSAV2+RG11 RESTORE R11 @V4M0193 00391000
  404. NOVMA DS 0H UNLOCK CURRENT R11 USER @V407510 00392000
  405. CHARGE SWITCH,1 SWITCH THE TIMER @V407510 00393000
  406. * R11 NOW POINTS TO NEW USER @V407510 00394000
  407. L R1,LOKSAV2+RG11 SET R1 TO OLD R11 @V4M0193 00395000
  408. C R1,LASTUSER OLD R11 = LASTUSER? @V407510 00397000
  409. BE LKSWEXIT YES, RETURN TO CALLER @V4M0193 00398000
  410. C R1,ASYSVM OLD R11 = SYSTEM VMBLOK? @V407510 00399000
  411. BE LKSWEXIT YES, RETURN TO CALLER @V4M0193 00400000
  412. LH R0,LPUADDR GET CURRENT PROCESSOR ADDRESS @V407510 00401000
  413. LA R1,VMLOCK-VMBLOK(R1) ADDRESS OF LOCKWORD @V407510 00402000
  414. CH R0,LKPROCA LOCK OWNED BY THIS PROCESSOR? @V407510 00403000
  415. BNE LOKAB3 NO, ABEND LOK003 @V407510 00404000
  416. SLR R14,R14 CLEAR REG TO ZERO @V4M0173 00405000
  417. ST R14,LKLOCK RELEASE VMBLOK LOCK @V4M0173 00406000
  418. LKSWEXIT DS 0H @V4M0193 00407000
  419. LM R0,R10,LOKSAV2 @VA08434 00408100
  420. LM R12,R15,LOKSAV2+REG12 @VA08434 00408200
  421. BR R14 RETURN TO CALLER @V4M0193 00409000
  422. LOKAB3 DS 0H @V407510 00410000
  423. ABEND 03 ABEND LOK003 @V407510 00411000
  424. EJECT 00412000
  425. * SUBROUTINE NAME - 00413000
  426. * DMKLOKSP 00414000
  427. * 00415000
  428. * FUNCTION - 00416000
  429. * THE FUNCTION OF THIS ENTRY POINT IS TO HANDLE THE OBTAIN, 00417000
  430. * SPIN=YES REQUEST FOR A LOCK AND THE ATTEMPT TO OBTAIN THE 00418000
  431. * LOCK FAILED. 00419000
  432. * 00420000
  433. * MACRO CALL FORMAT - 00421000
  434. * LOCK OBTAIN,TYPE=XXX,SPIN=YES 00422000
  435. * 00423000
  436. * ENTRY CONDITIONS - 00424000
  437. * GPR0 - PROCESSOR ADDRESS 00425000
  438. * GPR1 - LOCKWORD ADDRESS 00426000
  439. * GPR14- RETURN ADDRESS 00427000
  440. * GPR15- ENTRY POINT ADDRESS 00428000
  441. * 00429000
  442. * EXIT CONDITIONS - 00430000
  443. * NORMAL - 00431000
  444. * CONDITION CODE 0 - LOCK OBTAINED. 00432000
  445. * 00433000
  446. * ERROR - 00434000
  447. * LOK001 ABEND - LOCK ALREADY HELD BY REQUESTING 00435000
  448. * PROCESSOR. 00436000
  449. * 00437000
  450. * REGISTER USAGE - 00438000
  451. * SEE MAIN PROLOGUE 00439000
  452. * 00440000
  453. * OPERATION - 00441000
  454. * 1. SAVE REGS IN LOKSAVE 00442000
  455. * 2. ESTABLISH COMMON ADDRESSABILITY 00443000
  456. * 3. IF LOCK ALREADY OWNED, ABEND LOK001 00444000
  457. * 4. IF REQUEST FOR SYSTEM LOCK, SET CPSYSLK 00445000
  458. * AND CPLOKFL. 00446000
  459. * 5. CALL LOKSPIN 00447000
  460. * 6. CLEAR CPSYSLK IF REQUEST WAS FOR SYSTEM LOCK. 00448000
  461. * 7. SET CONDITION CODE = 0 00449000
  462. * 8. RESTORE REGS 00450000
  463. * 9. RETURN TO CALLER 00451000
  464. * 00452000
  465. * 00453000
  466. DMKLOKSP DS 0H SPIN OBTAIN ENTRY POINT @V407510 00454000
  467. USING *,R15 SET UP TEMPORARY ADDRESSABILITY @V407510 00455000
  468. STM R0,R15,LOKSAVE SAVE REGISTERS IN PSA @V407510 00456000
  469. L R12,LOKBASE LOAD COMMON BASE REGISTER @V407510 00457000
  470. DROP R15 DROP TEMPORARY BASE REG @V407510 00458000
  471. USING DMKLOK,R12 SET UP COMMON BASE REG @V407510 00459000
  472. CH R0,LKPROCA LOCK ALREADY OWNED? @V407510 00460000
  473. BE LOKAB1 YES, ABEND LOK01 @V407510 00461000
  474. C R1,=A(DMKLOKSY) REQUEST FOR SYSTEM LOCK? @V407510 00462000
  475. BNE LOKSPIN0 NO, SKIP FLAG SETTINGS @V407510 00463000
  476. OI APSTAT4,CPLOKFL INDICATE ENABLING FOR EXTERNAL @VA07615 00464100
  477. * INTERRUPTS @V4M0173 00465000
  478. L R14,PREFIXB GET OTHER PROC PREFIX ADDRESS @V4M0173 00466000
  479. OI APSTAT3-PSA(R14),CPSYSLK TELL OTHER PROC'R THE @VA07615 00467000
  480. * SYSTEM LOCK IS NEEDED @V4M0173 00468000
  481. BAL R14,LOKSPIN BRANCH TO SPIN ROUTINE @V407510 00469000
  482. MVC LKLOCKER,LOKSAVE+REG12 SAVE LOCKER R12 @V407510 00470000
  483. L R14,PREFIXB GET OTHER PROC PREFIX ADDRESS @V4M0173 00471000
  484. NI APSTAT3-PSA(R14),X'FF'-CPSYSLK TURN OFF FLAG @VA07615 00472000
  485. * IN OTHER PROCESSOR'S PSA @V4M0173 00473000
  486. B SETCC0 BRANCH TO SET CONDITION CODE 0 @V407510 00474000
  487. LOKSPIN0 DS 0H @V407510 00475000
  488. BAL R14,LOKSPIN BRANCH TO SPIN ROUTINE @V407510 00476000
  489. L R14,LOKSAVE+REG12 GET R12 VALUE OF CALLER @V4M0173 00477000
  490. ST R14,LKLOCKER SAVE R12 VALUE @V4M0173 00478000
  491. B SETCC0 BRANCH TO SET CONDITION CODE 0 @V407510 00479000
  492. EJECT 00480000
  493. * SUBROUTINE NAME - 00481000
  494. * DMKLOKPS 00482000
  495. * 00483000
  496. * FUNCTION - 00484000
  497. * THE FUNCTION OF THIS ENTRY POINT IS TO HANDLE ALL SPIN 00485000
  498. * REQUESTS FOR THE SYSTEM. 00486000
  499. * 00487000
  500. * ENTRY CONDITIONS - 00488000
  501. * CALLED BY DMKDSP FOR EXTEND PROCESSING 00489000
  502. * CALLED BY DMKMCT FOR SYSTEM TERMINATION 00490000
  503. * 00491000
  504. * GPR0 - CONDITION FOR END-OF-SPIN 00492000
  505. * GPR1 - SPIN LOCKWORD ADDRESS 00493000
  506. * GPR15- ENTRY POINT ADDRESS 00494000
  507. * 00495000
  508. * EXIT CONDITIONS - 00496000
  509. * ERROR - 00497000
  510. * 00498000
  511. * REGISTER USAGE - 00499000
  512. * SEE MAIN PROCESSOR. 00500000
  513. * 00501000
  514. * OPERATION - 00502000
  515. * 1. SAVE REGS IN LOKSAVE 00503000
  516. * 2. ESTABLISH COMMON ADDRESSABILITY 00504000
  517. * 3. IF SPINNING ON EXTEND INDICATOR, SET CPLOKFL. 00505000
  518. * 4. CALL LOKSPIN 00506000
  519. * 5. RESTORE REGS 00507000
  520. * 6. RETURN TO CALLER. 00508000
  521. * 00509000
  522. DMKLOKPS DS 0H PROCESSOR SPIN ENTRY POINT @V407510 00510000
  523. USING *,R15 SET UP TEMPORARY ADDRESSABILITY @V407510 00511000
  524. STM R0,R15,LOKSAVE SAVE REGISTERS IN PSA @V407510 00512000
  525. L R12,LOKBASE LOAD COMMON BASE REGISTER @V407510 00513000
  526. DROP R15 DROP TEMPORARY BASE REG @V407510 00514000
  527. USING DMKLOK,R12 SET UP COMMON BASE REG @V407510 00515000
  528. L R2,PREFIXA GET OWN PREFIX REG @V407510 00516000
  529. LA R2,XTNDLOCK-PSA(,R2) ADDR OF EXTEND LOCK @V407510 00517000
  530. LA R3,0(,R1) CLEAR HIGH ORDER BYTE @V407510 00518000
  531. CR R2,R3 SPINNING ON EXTEND LOCK? @V407510 00519000
  532. BNE LOKSPIN0 NO, DO NOT SET FLAG @V407510 00520000
  533. OI APSTAT4,CPLOKFL SET SPECIAL LOK INDICATOR @VA07615 00521100
  534. B LOKSPIN0 JOIN COMMON CODE TO CALL SPIN @V407510 00522000
  535. EJECT 00523000
  536. * SUBROUTINE NAME - 00524000
  537. * LOKSPIN - 00525000
  538. * 00526000
  539. * FUNCTION - 00527000
  540. * THE FUNCTION OF THIS ENTRY POINT IS TO SPIN ON A 00528000
  541. * PARTICULAR CONDITION. A WINDOW MUST BE OPENED DURING THE 00529000
  542. * SPIN TO ALLOW MALFUNCTION ALERT AND EMERGENCY INTERRUPT 00530000
  543. * SIGNALS TO BE RECEIVED. 00531000
  544. * 00532000
  545. * NOTE: 00533000
  546. * LOKSAVE + 24 IS USED AS A DATAAREA SO THAT THIS ROUTINE 00534000
  547. * IS REENTRANT. REGS 6-9 ARE NOT USED IN THIS ROUTINE OR 00535000
  548. * DMKLOKPS OR DMKLOKSP. 00536000
  549. * REGS6-9 ARE RESTORED IN LOKSAVE BEFORE EXITING SO THAT 00537000
  550. * COMMON EXIT LOGIC CAN BE USED. 00538000
  551. * 00539000
  552. * ENTRY CONDITIONS - 00540000
  553. * GPR 0 - CONDITION TO END SPIN 00541000
  554. * GPR 1 - SPIN LOCKWORD ADDRESS 00542000
  555. * GPR14- RETURN ADDRESS 00543000
  556. * GPR15- ENTRY POINT ADDRESS 00544000
  557. * 00545000
  558. * EXIT CONDITIONS - 00546000
  559. * ERROR - 00547000
  560. * CVT001 ABEND - STCK FAILED 00548000
  561. * 00549000
  562. * REGISTER USAGE - 00550000
  563. * SEE MAIN PROLOGUE. 00551000
  564. * 00552000
  565. * OPERATIONS - 00553000
  566. * 1. ESTABLISH TRACE ENTRY 00554000
  567. * 2. START TIMER. 00555000
  568. * 3. IF SPIN CONDITION SATISFIED, GOTO STEP 9. 00556000
  569. * IF SPINNING FOR A LOCK, C&S LOCKWORD. 00557000
  570. * IF SPINNING ON A BYTE, COMPARE BYTE WITH 00558000
  571. * VALUE IN REGISTER 0. 00559000
  572. * 4. OPEN WINDOW FOR MFA. 00560000
  573. * 5. CLOSE WINDOW FOR MFA. 00561000
  574. * 6. IF SPINNING ON SYSTEM LOCK, OPEN WINDOW 00562000
  575. * FOR EMERGENCY SIGNAL. 00563000
  576. * CLOSE WINDOW FOR EMERGENCY SIGNAL. 00564000
  577. * 7. GOTO STEP 4. 00565000
  578. * 8. TURN OFF CPLOKFL. 00566000
  579. * 9. CALCULATE TIME SPENT SPINNING. 00567000
  580. * 10. RETURN TO CALLER. 00568000
  581. * 00569000
  582. LOKSPIN DS 0H COMMON SPIN ROUTINE @V407510 00570000
  583. AIF (NOT &TRACE(9)).TR1 00571000
  584. TM TRACFLG2,TRAC12 TRACING ACTIVE? @V407510 00572000
  585. BZ NOTRACE NO, SKIP TRACING @V407510 00573000
  586. TRACE CODE=TRCLOK,R2,R3,R4 @V407510 00574000
  587. USING TRACE,R2 SET UP ADDRESSABILITY FOR TRACE @V407510 00575000
  588. * ENTRY @V407510 00576000
  589. MVC TRACEVM(AL3),LOKSAVE+REG11B1 R11 VALUE UPON @V407510 00577000
  590. * ENTRY @V407510 00578000
  591. ST R1,TRACELKW LOCKWORD ADDRESS @V407510 00579000
  592. MVC TRACERTN,LOKSAVE+REG14B0 RETURN ADDRESS OF @V407510 00580000
  593. * REQUESTOR @V407510 00581000
  594. MVC TRACELK,0(R1) CONTENTS OF LOCKWORD @V407510 00582000
  595. NOTRACE DS 0H @V407510 00583000
  596. .TR1 ANOP 00584000
  597. STCK LOKTIMER STORE CLOCK TO TIME SPIN @V407510 00585000
  598. BC CLKBAD,CLOCKBAD BRANCH IF CLOCK SICK @V407510 00586000
  599. MVC LOKCTLRG,CPCREG0 USE CONTROL REG 0 @V4M0173 00587000
  600. XC MPMASK(LN2),MPMASK TURN OFF ALL MP MASKS @V407510 00588000
  601. TM APSTAT4,CPLOKFL OPENING WINDOW FOR EMS & MFA @VA07615 00589100
  602. BNO ENMFA NO, SKIP EMERGENCY SIGNAL @V407510 00590000
  603. OI MPMASK,EMSMASK ENABLE FOR EMERGENCY SIGNAL @V407510 00591000
  604. ENMFA DS 0H @V407510 00592000
  605. OI MPMASK,MFAMASK ENABLE FOR MALFUNCTION ALERT @V407510 00593000
  606. LCTL C0,C0,LOKCTLRG ENABLE FOR MFA ( & EMS ) @V407510 00594000
  607. LA R2,LPCTL SET UP LOOP CONTROL @V407510 00595000
  608. SPINLOOP DS 0H LOOP FOR SPINNING @V407510 00596000
  609. LTR R1,R1 SPINNING ON BYTE? @V407510 00597000
  610. BM SPINBYTE YES, BRANCH @V407510 00598000
  611. SR R3,R3 CLEAR REGISTER FOR C&S @V407510 00599000
  612. C R3,0(,R1) LOCK AVAILABLE? @V4M0160 00600000
  613. BNE WINDOW NO, CONTINUE SPIN @V4M0160 00601000
  614. CS R3,R0,0(R1) TRY TO OBTAIN LOCK @V407510 00602000
  615. BZ SPINEND SUCCESSFUL, END SPIN @V407510 00603000
  616. WINDOW DS 0H OPEN WINDOW @V407510 00604000
  617. BCT R2,SPINLOOP ONLY OPEN WINDOW EVERY SO OFTEN @V407510 00605000
  618. STOSM SYSMASK,EXTINT ENABLE FOR EXTERNALS @V407510 00606000
  619. STNSM SYSMASK,OFF-EXTINT DISABLE FOR EXTERNALS @V407510 00607000
  620. LA R2,LPCTL RESET LOOP CONTROL @V407510 00608000
  621. B SPINLOOP LOOP UNTIL LOCK OBTAINED @V407510 00609000
  622. SPINBYTE DS 0H SPINNING ON A BYTE @V407510 00610000
  623. CLC 0(ONE,R1),LOKSAVE+RG0B3 READY TO STOP @V407510 00611000
  624. * SPINNING @V407510 00612000
  625. BNE WINDOW NO, LOOP @V407510 00613000
  626. SPINEND DS 0H FINISHED SPINNING @V407510 00614000
  627. LA R1,0(,R1) GET GOOD ADDRESS OF LOCKWORD @V407510 00615000
  628. LCTL C0,C0,CPCREG0 RESET CREG 0 @V407510 00616000
  629. LM R2,R3,LOKTIMER LOAD TIMER VALUE INTO REGS @V407510 00617000
  630. STCK LOKTIMER GET NEW TIMER VALUE @V407510 00618000
  631. BC CLKBAD,CLOCKBAD BRANCH IF CLOCK SICK @V407510 00619000
  632. LM R4,R5,LOKTIMER LOAD TIMER VALUE INTO REGS @V407510 00620000
  633. SRDL R2,BIT51 SHIFT TO MICROSECONDS @V405510 00621000
  634. SRDL R4,BIT51 SHIFT TO MICROSECONDS @V405510 00622000
  635. SLR R5,R3 GET ELAPSED TIME @V407510 00623000
  636. C R1,LOCKSBEG LOCKWORD IN DMKLOK? @V407510 00624000
  637. BL SPECLOCK NO, USE SPECIAL TIMER @V407510 00625000
  638. C R1,LOCKSEND LOCKWORD IN DMKLOK? @V407510 00626000
  639. BNH UPTIMER YES, UPDATE TIMER @V407510 00627000
  640. SPECLOCK DS 0H @V407510 00628000
  641. LA R1,DMKLOKSI USE COMMON TIMER ACCUMULATOR @V407510 00629000
  642. UPTIMER DS 0H @V407510 00630000
  643. A R5,LKTIMER ADD PREVIOUS ACCUMULATED TIME @V407510 00631000
  644. ST R5,LKTIMER STORE TOTAL SPIN TIME @V407510 00632000
  645. L R2,COUNTER LOAD COUNT OF SPINS @V407510 00633000
  646. LA R2,ONE(,R2) INCREMENT COUNTER BY ONE @V407510 00634000
  647. ST R2,COUNTER STORE NEW COUNT @V407510 00635000
  648. NI APSTAT4,X'FF'-CPLOKFL TURN OFF CPLOKFL @VA07615 00636100
  649. STM R6,R9,SPECSAVE RESTORE LOKSAVE TO INPUT REGS @V407510 00637000
  650. BR R14 RETURN TO CALLER @V407510 00638000
  651. CLOCKBAD DS 0H STCK FAILED @V407510 00639000
  652. GOTO DMKCVTAB ABEND @V407510 00640000
  653. EJECT 00641000
  654. * DATA AREAS AND EQUATES 00642000
  655. * 00643000
  656. ***************************************************************@V407510 00644000
  657. * @V407510 00645000
  658. * THE FOLLOWING AREAS ARE DEFINED ON LOKSAVE+24 @V407510 00646000
  659. * THE ACTUAL EQUATES ARE FOLLOWING THE PSA @V407510 00647000
  660. * @V407510 00648000
  661. *LOKTIMER DC 1D'0' TIMER VALUE FOR SPINNING @V407510 00649000
  662. *LOKCTLRG DC 1F'0' SAVE CONTROL REG 0 @V407510 00650000
  663. *MPMASK EQU LOKCTLRG+2 MASK FOR MP OPERATIONS @V407510 00651000
  664. *SYSMASK DC X'00' SYSTEM MASK FROM STOSM & STNSM @V407510 00652000
  665. *SPECSAVE DC 4F SAVE REGS 6-9 @V407510 00653000
  666. * @V407510 00654000
  667. ***************************************************************@V407510 00655000
  668. LOKBASE DC A(DMKLOK) COMMON BASE REGISTER FOR DMKLOK @V407510 00656000
  669. SPACE 2 00657000
  670. ***************************************************************@V407510 00658000
  671. LOCKSBEG DC A(*) BEGINNING OF LOCKWORDS @V407510 00659000
  672. DMKLOKSY DC 4F'0' SYSTEM LOCKWORD @V407510 00660000
  673. DMKLOKFR DC 4F'0' DMKFRE LOCKWORD @V407510 00661000
  674. DMKLOKRL DC 4F'0' RUNLIST LOCKWORD @V407510 00662000
  675. DMKLOKTR DC 4F'0' TIMER REQUEST LOCKWORD @V407510 00663000
  676. DMKLOKDS DC 4F'0' DISPATCHER QUEUES LOCKWORD @V407510 00664000
  677. LOCKSEND DC A(*) END OF LOCKWORDS @V407510 00665000
  678. DMKLOKSI DC 4F'0' SPIN INDICATOR LOCKWORD @V407510 00666000
  679. * COUNTER AND TIMER WILL BE USED @V407510 00667000
  680. * TO ACCUMULATE TIME SPINNING FOR @V407510 00668000
  681. * DMKLOKPS ENTRIES FOR BYTE @V407510 00669000
  682. * MANIPULATIONS AND DMKLOKSP @V407510 00670000
  683. * ENTRIES FOR NON DMKLOK LOCKS @V407510 00671000
  684. ***************************************************************@V407510 00672000
  685. DMKLOKCT DC 2F'0' COUNTERS FOR MONITOR @V407510 00673000
  686. LOKSYSCT EQU DMKLOKCT COUNT OF SYSTEM LOCK DEFERS @V407510 00674000
  687. LOKVMCT EQU DMKLOKCT+4 COUNT OF VMBLOK LOCK DEFERS @V407510 00675000
  688. EJECT 00676000
  689. * EQUATES @V407510 00677000
  690. SPACE 2 00678000
  691. EXTINT EQU X'01' EXTERNAL INTERRUPT MASK IN PSW @V407510 00679000
  692. WS014 EQU X'14' 014 WAIT STATE @V407510 00680000
  693. BIT51 EQU 63-51 SHIFT VALUE TO GET BIT 51 IN @V407510 00681000
  694. * BIT POSITION 31 OF FULLWORD @V407510 00682000
  695. * BIT51 OF CLOCK IS 1 MICROSECOND @V407510 00683000
  696. THISPROC EQU 1 CURRENT PROCESSOR ADDRESS @V407510 00684000
  697. HIGHBYTE EQU 8 MASK FOR HIGH ORDER BYTE @V407510 00685000
  698. REG0B3 EQU 11 MASK IS IN LOW BYTE OF @V407510 00686000
  699. * ORIGINAL REG 0 @V407510 00687000
  700. OFF EQU X'FF' MASK TO TURN OFF CPSYSLK @V407510 00688000
  701. REG11B1 EQU 11*4+1 REG11 UPON ENTRY @V407510 00689000
  702. REG14B0 EQU 14*4 REG14 UPON ENTRY @V407510 00690000
  703. REG12 EQU 12*4 REG 12 UPON ENTRY @V407510 00691000
  704. AL3 EQU 3 LENGTH OF 3 BYTE ADDRESS AREA @V407510 00692000
  705. ONE EQU 1 INCREMENT OR LENGTH OF 1 @V407510 00693000
  706. ZERO EQU 0 @V407510 00694000
  707. RG0B3 EQU 3 STOP BYTE SPIN @V407510 00695000
  708. LN2 EQU 2 2 BYTES OF CREG0 FOR MP MASKS @V407510 00696000
  709. LPCTL EQU 10 LOOP CONTROL FOR OPENING WINDOW @V407510 00697000
  710. CLKBAD EQU 3 BRANCH MASK FOR STCK @V407510 00698000
  711. * CC=0 & CC=1 OK @V407510 00699000
  712. RG11 EQU 11*4 DISPLACEMENT FOR REG11 @V407510 00700000
  713. RGLN EQU 16*4 LENGTH OF SAVEAREA @V407510 00701000
  714. EJECT 00702000
  715. * LOCKWORD DSECT @V407510 00703000
  716. LOCKWORD DSECT @V407510 00704000
  717. LKLOCK DS 1F ADDR OF PROCESSOR HOLDING LOCK @V407510 00705000
  718. LKPROCA EQU LKLOCK+2 PROCESSOR ADDRESS ONLY HALFWORD @V407510 00706000
  719. LKLOCKER DS 1F R12 VALUE OF ROUTINE THAT @V407510 00707000
  720. * OBTAINED LOCK @V407510 00708000
  721. LKTIMER DS 1F TIME SPENT SPINNING ON LOCK @V407510 00709000
  722. COUNTER DS 1F TOTAL NUMBER OF SPINS FOR LOCK @V407510 00710000
  723. SPACE 3 00711000
  724. * TRACE ENTRY DSECT @V407510 00712000
  725. TRACE DSECT @V407510 00713000
  726. TRACEID DS 1X ENTRY IDENTIFIER @V407510 00714000
  727. TRACEVM DS AL3 R11 ADDRESS UPON ENTRY TO DMKLOK @V407510 00715000
  728. TRACELKW DS 1F LOCKWORD ADDRESS @V407510 00716000
  729. TRACERTN DS 1F RETURN ADDRESS OF REQUESTOR @V407510 00717000
  730. TRACELK DS 1F CONTENTS OF LOCKWORD @V407510 00718000
  731. EJECT 00719000
  732. PSA 00720000
  733. ***************************************************************@V407510 00721000
  734. * @V407510 00722000
  735. * REGS 6-9 ARE NOT DESTROYED FOR DMKLOKPS AND @V407510 00723000
  736. * DMKLOKSP ENTRIES. LOKSAVE + 24 FOR 4 WORDS IS @V407510 00724000
  737. * USED AS AN INTERNAL WORK AREA @V407510 00725000
  738. LOKTIMER EQU LOKSAVE+4*6 TIMER VALUE FOR SPINNING @V407510 00726000
  739. LOKCTLRG EQU LOKSAVE+4*8 SAVE CONTROL REG 0 @V407510 00727000
  740. MPMASK EQU LOKCTLRG+2 MASK FOR MP OPERATIONS @V407510 00728000
  741. SYSMASK EQU LOKSAVE+4*9 SYSTEM MASK FROM STOSM & STNSM @V407510 00729000
  742. SPECSAVE EQU LOKSAVE+6*4 SAVE REGS 6-9 @V407510 00730000
  743. * 00731000
  744. ***************************************************************@V407510 00732000
  745. COPY EQU @V407510 00733000
  746. COPY VMBLOK @V407510 00734000
  747. COPY SAVE @V407510 00735000
  748. END 00736000
ibm/vm370-lib/cp/dmklok.assemble_src.txt ยท Last modified: 2023/08/06 13:37 by Site Administrator