ibm:vm370-lib:macro:lock.macro_src
Table of Contents
LOCK Source
References
- Fixes Applied : 2
- This Source Date : Friday, December 8, 1978
- Last Fix ID : [R14604DK]
Source Listing
- LOCK.MACRO.txt
- MACRO @V407510 00001000
- &NAME LOCK &REQUEST,&TYPE=,&SPIN=,&OPTION=,&SAVE @V407510 00002000
- .* NEW MACRO FOR ATTACHED PROCESSOR SUPPORT @V407510 00003000
- GBLB &AP @V407510 00004000
- GBLB &LOCK @V407510 00005000
- LCLC &ID @V407510 00006000
- LCLC &C @V407510 00007000
- LCLB &A,&B,&S,&SA,&U @V407510 00008000
- AIF (T'&NAME EQ 'O').NOLABEL @V407510 00009000
- &NAME DS 0H @V407510 00010000
- .NOLABEL ANOP @V407510 00011000
- &ID SETC '&SYSNDX' @V407510 00012000
- AIF ('&AP' EQ '0').SETCC0 @V407510 00013000
- TM APSTAT1,APUOPER RUNNING AP? @V407510 00014000
- BNO LOK&ID.B NO, BRANCH AROUND LOCKING @V407510 00015000
- &LOCK SETB 0 SET GLOBAL VARIABLE FOR ABEND @V407510 00016000
- &A SETB 0 INDICATE OBTAIN REQUEST @V407510 00017000
- &B SETB 0 INDICATE NOT VM BLOCK @V407510 00018000
- &U SETB 0 INDICATE UPDATE @V407510 00019000
- AIF (T'&REQUEST EQ 'O').ERR1 @V407510 00020000
- AIF ('&REQUEST' EQ 'OBTAIN').OBTAIN @V407510 00021000
- AIF ('&REQUEST' NE 'RELEASE').ERR2 @V407510 00022000
- .RELEASE ANOP @V407510 00023000
- &A SETB 1 INDICATE RELEASE REQUEST @V407510 00024000
- .OBTAIN ANOP @V407510 00025000
- AIF (T'&TYPE EQ 'O').ERR3 @V407510 00026000
- AIF ('&TYPE' EQ 'SYS').SYS @V407510 00027000
- AIF ('&TYPE' EQ 'VMBLOK').VM @V407510 00028000
- AIF ('&TYPE' EQ 'DS').DS @V407510 00030000
- AIF ('&TYPE' EQ 'IO').IO @V407510 00031000
- AIF ('&TYPE' EQ 'RL').RL @V407510 00032000
- AIF ('&TYPE' EQ 'FREE').FREE @V407510 00033000
- AIF ('&TYPE' EQ 'TR').TR @V407510 00034000
- AIF ('&TYPE' NE 'PRIVATE').ERR4 @V407510 00035000
- .PRIVATE ANOP @V407510 00036000
- &C SETC '0(,R1)' @V407510 00037000
- AGO .LABEL @V407510 00038000
- .DS ANOP @V407510 00039000
- &C SETC '=V(DMKLOKDS)' @V407510 00040000
- AGO .LABEL @V407510 00041000
- .FREE ANOP @V407510 00042000
- &C SETC 'ALOKFR'
- AGO .LABEL @V407510 00044000
- .RL ANOP @V407510 00045000
- &C SETC '=V(DMKLOKRL)' @V407510 00046000
- AGO .LABEL @V407510 00047000
- .IO ANOP @V407510 00048000
- &C SETC '=V(DMKLOKIO)' @V407510 00049000
- AGO .LABEL @V407510 00050000
- .TR ANOP @V407510 00051000
- &C SETC '=V(DMKLOKTR)' @V407510 00052000
- AGO .LABEL @V407510 00053000
- .SYS ANOP @V407510 00054000
- &C SETC 'ALOKSY'
- AGO .LABEL @V407510 00056000
- .VM ANOP @V407510 00057000
- &B SETB 1 INDICATE VMBLOK LOCK REQUEST @V407510 00058000
- .LABEL ANOP @V407510 00059000
- &S SETB 0 INDICATE SPIN=NO @V407510 00060000
- AIF ('&A' EQ '1').SAVE @V407510 00061000
- AIF ('&SPIN' EQ 'NO').SAVE @V407510 00062000
- AIF (T'&SPIN EQ 'O').SPIN @V407510 00063000
- AIF ('&SPIN' NE 'YES').ERR5 @V407510 00064000
- .SPIN AIF ('&B' EQ '1').ERR6 @V407510 00065000
- &S SETB 1 INDICATE SPIN=YES @V407510 00066000
- .SAVE ANOP @V407510 00067000
- &SA SETB 0 INDICATE NO SAVE @V407510 00068000
- AIF ('&SAVE' EQ '').UPDT @V407510 00069000
- AIF ('&SAVE' NE 'SAVE').ERR7 @V407510 00070000
- STM R14,R1,LOCKSAV SAVE REGS 14 - 1 @V407510 00071000
- &SA SETB 1 INDICATE SAVE OPTION @V407510 00072000
- .UPDT ANOP @V407510 00073000
- AIF (T'&OPTION EQ 'O').TEST @V407510 00074000
- AIF ('&OPTION' NE 'NOUPDT').ERR8 @V407510 00075000
- &U SETB 1 INDICATE NOUPDATE OPTION @V407510 00076000
- .TEST ANOP @V407510 00077000
- AIF ('&A' EQ '1').REL @V407510 00078000
- .* &A = 0 - OBTAIN REQUEST @V407510 00079000
- AIF ('&B' EQ '0').OBT OBTAIN NON-VMBLOK @V407510 00080000
- .* &A=0, &B=1 - OBTAIN VMBLOK REQUEST @V407510 00081000
- AIF ('&U' EQ '1').OBTVM OBTAIN, VMBLOK, NOUPDATE @V407510 00082000
- .* &A=0, &B=1, &U=0 - UPDATE OBTAIN VMBLOK @V407510 00083000
- .* NORMAL VMBLOK OBTAIN- GOTO LOCK MGR @V407510 00085000
- L R15,ALOKVM ADDRESS OF DMKLOKVM @V407510 00086000
- BALR R14,R15 CALL DMKLOKVM @V407510 00087000
- AGO .END @V407510 00088000
- .* &A=0, &B=0 NON VMBLOK OBTAIN REQUEST @V407510 00109000
- .OBT ANOP @V407510 00110000
- LH R0,LPUADDR PROCESSOR ADDRESS @V407510 00111000
- AIF ('&TYPE' EQ 'PRIVATE').SKIP1 @V407510 00112000
- L R1,&C LOCKWORD ADDRESS @V407510 00113000
- .SKIP1 ANOP @V407510 00114000
- SR R14,R14 ZERO FOR LOCK NOT HELD @V407510 00115000
- CS R14,R0,0(R1) TRY TO OBTAIN LOCK @V407510 00116000
- AIF ('&TYPE' EQ 'PRIVATE').SK1 @V407510 00117000
- AIF ('&TYPE' EQ 'FREE').SK1 00117100
- BNZ LOK&ID.C UNSUCCESSFUL, CALL LOCK MGR @V407510 00118000
- ST R12,4(,R1) SAVE LOCKER R12 @V407510 00119000
- AIF ('&SA' EQ '0').SKIP2 SAVE SPECIFIED? @V407510 00120000
- B LOK&ID.A BRANCH TO RESTORE REGISTERS @V407510 00121000
- AGO .SKIP3 @V407510 00122000
- .SK1 ANOP PRIVATE LOCK, NO R12 STORE @V407510 00123000
- AIF ('&SA' EQ '0').SK2 SAVE SPECIFIED? @V407510 00124000
- BZ LOK&ID.A BRANCH TO RESTORE REGS @V407510 00125000
- AGO .SK3 BRANCH TO ERROR CODE @V407510 00126000
- .SK2 ANOP SAVE NOT SPECIFIED @V407510 00127000
- BZ LOK&ID.B FINISHED @V407510 00128000
- AGO .SK3 BRANCH TO ERROR CODE @V407510 00129000
- .SKIP2 ANOP @V407510 00130000
- B LOK&ID.B FINISHED @V407510 00131000
- .SKIP3 ANOP @V407510 00132000
- LOK&ID.C DS 0H LOCK NOT OBTAINED @V407510 00133000
- .SK3 ANOP @V407510 00134000
- AIF ('&S' EQ '1').CHECK1 SPIN = YES? @V407510 00135000
- &C SETC '=V(DMKLOKDF)' SET UP FOR DEFER ENTRY @V407510 00136000
- AGO .BRANCH1 @V407510 00137000
- .CHECK1 ANOP @V407510 00138000
- &C SETC 'ALOKSP' SET UP FOR SPIN ENTRY @V407510 00139000
- .BRANCH1 ANOP @V407510 00140000
- L R15,&C ADDRESS OF LOCK MANAGER @V407510 00141000
- BALR R14,R15 BRANCH TO LOCK MANAGER @V407510 00142000
- AGO .END FINISH EXPANSION @V407510 00143000
- .OBTVM ANOP OBTAIN VMBLOK NOUPDATE @V407510 00144000
- LH R0,LPUADDR PROCESSOR ADDRESS @V407510 00145000
- SR R14,R14 ZERO FOR LOCK NOT HELD @V407510 00146000
- CS R14,R0,VMLOCK-VMBLOK(R1) TRY TO OBTAIN LOCK @V407510 00147000
- BNZ LOK&ID.C UNSUCCESSFUL, CALL LOCK MGR @V407510 00148000
- ST R12,VMLOCKER-VMBLOK(,R1) SAVE LOCKER R12 @V407510 00149000
- AIF ('&SA' EQ '0').SKIP8 SAVE SPECIFIED? @V407510 00150000
- B LOK&ID.A BRANCH TO RESTORE REGISTERS @V407510 00151000
- AGO .SKIP9 @V407510 00152000
- .SKIP8 ANOP @V407510 00153000
- B LOK&ID.B FINISHED @V407510 00154000
- .SKIP9 ANOP @V407510 00155000
- LOK&ID.C DS 0H LOCK NOT OBTAINED @V407510 00156000
- LA R1,VMLOCK-VMBLOK(,R1) LOCKWORD ADDRESS @V407510 00157000
- L R15,=V(DMKLOKDF) ADDRESS OF LOCK MANAGER @V407510 00158000
- BALR R14,R15 BRANCH TO LOCK MANAGER @V407510 00159000
- AGO .END FINISH EXPANSION @V407510 00160000
- .* &A=1 RELEASE REQUEST @V407510 00161000
- .REL ANOP @V407510 00162000
- LH R0,LPUADDR PROCESSOR ADDRESS @V407510 00163000
- AIF ('&TYPE' EQ 'PRIVATE').SKIP4 @V407510 00164000
- AIF ('&B' EQ '1').SKIP4 @V407510 00165000
- L R1,&C LOCKWORD ADDRESS @V407510 00166000
- .SKIP4 ANOP @V407510 00167000
- SR R14,R14 ZERO FOR LOCK NOT HELD @V407510 00168000
- AIF ('&B' EQ '1').SKIP5 @V407510 00169000
- C R0,0(,R1) LOCK CURRENTLY OWNED? @V4M0160 00170100
- BE LOK&ID.D YES, CLEAR LOCKWORD @V4M0160 00170200
- &LOCK SETB 1 @V4M0160 00170300
- ABEND 03 LOCK NOT HELD, LOK003 ABEND @V4M0160 00170400
- &LOCK SETB 0 @V4M0160 00170500
- LOK&ID.D DS 0H @V4M0160 00170600
- ST R14,0(,R1) CLEAR LOCKWORD @V4M0160 00170700
- AGO .SKIP6 @V407510 00171000
- .SKIP5 ANOP @V407510 00172000
- C R0,VMLOCK-VMBLOK(R1) LOCK CURRENTLY OWNED? @V4M0160 00173100
- BE LOK&ID.D YES, CLEAR LOCKWORD @V4M0160 00173200
- &LOCK SETB 1 @V4M0160 00173300
- ABEND 03 LOCK NOT HELD, LOK003 ABEND @V4M0160 00173400
- &LOCK SETB 0 @V4M0160 00173500
- LOK&ID.D DS 0H @V4M0160 00173600
- ST R14,VMLOCK-VMBLOK(R1) CLEAR LOCKWORD @V4M0160 00173700
- .SKIP6 ANOP @V407510 00174000
- AGO .END @V407510 00185000
- .ERR1 ANOP @V407510 00190000
- MNOTE 8,'REQUIRED POSITIONAL OPERAND MISSING' @V407510 00191000
- AGO .EXIT @V407510 00192000
- .ERR2 ANOP @V407510 00193000
- MNOTE 8,'INVALID POSITIONAL OPERAND' @V407510 00194000
- AGO .EXIT @V407510 00195000
- .ERR3 ANOP @V407510 00196000
- MNOTE 8,TYPE OPERAND REQUIRED, NOT SPECIFIED' @V407510 00197000
- AGO .EXIT @V407510 00198000
- .ERR4 ANOP @V407510 00199000
- MNOTE 8,'INVALID TYPE= OPERAND SPECIFIED' @V407510 00200000
- AGO .EXIT @V407510 00201000
- .ERR5 ANOP @V407510 00202000
- MNOTE 8,'INVALID SPIN= OPERAND SPECIFIED' @V407510 00203000
- AGO .EXIT @V407510 00204000
- .ERR6 ANOP @V407510 00205000
- MNOTE 8,'MUTUALLY EXCLUSIVE KEYWORDS SPIN=YES, TYPE=VMBLOK' 00206000
- AGO .EXIT @V407510 00207000
- .ERR7 ANOP @V407510 00208000
- MNOTE 8,'INVALID SAVE PARAMETER' @V407510 00209000
- AGO .EXIT @V407510 00210000
- .ERR8 ANOP @V407510 00211000
- MNOTE 8,'INVALID OPTION= OPERAND SPECIFIED' @V407510 00212000
- AGO .EXIT @V407510 00213000
- .END ANOP @V407510 00214000
- AIF ('&SA' EQ '0').END1 @V407510 00215000
- LOK&ID.A DS 0H @V407510 00216000
- LM R14,R1,LOCKSAV RESTORE REGS 14-1 @V407510 00217000
- .END1 ANOP @V407510 00218000
- .EXIT ANOP @V407510 00219000
- LOK&ID.B DS 0H END OF EXPANSION @V407510 00220000
- MEXIT @V407510 00221000
- .SETCC0 ANOP @V407510 00222000
- AIF ('&REQUEST' EQ 'RELEASE').NOGEN @V4M0160 00222100
- AIF ('&SPIN' NE 'NO').NOGEN 00222110
- CLR R0,R0 SET CONDITION CODE = 0 00223000
- MEXIT @V4M0160 00223100
- .NOGEN ANOP @V4M0160 00223200
- MEND @V407510 00224000
ibm/vm370-lib/macro/lock.macro_src.txt ยท Last modified: 2023/08/06 13:38 by Site Administrator