SIG TITLE 'DMTSIG (RSCS) VM/370 - RELEASE 6' 00001000 *. 00002000 * MODULE NAME - 00003000 * 00004000 * DMTSIG 00005000 * 00006000 * FUNCTION - 00007000 * 00008000 * PERFORM A TASK ALERT EXIT ON TASK REQUEST 00009000 * 00010000 * ATTRIBUTES - 00011000 * 00012000 * REUSABLE, NON-INTERRUPTABLE 00013000 * 00014000 * ENTRY POINTS - 00015000 * 00016000 * DMTSIG - ALERT A TASK 00017000 * 00018000 * ENTRY CONDITIONS - 00019000 * 00020000 * GPR0 = TASK NAME OF TASK TO BE ALERTED 00021000 * GPR1 -> 12 = INFORMATION TO BE PASSED TRANSPARENTLY 00022000 * TO THE ALERTED TASK'S ALERT EXIT ROUTINE 00023000 * GPR14 = RETURN ADDRESS 00024000 * GPR15 = ENTRY ADDRESS (LOADED FROM 'ALERTREQ') 00025000 * 00026000 * EXIT CONDITIONS - 00027000 * 00028000 * NORMAL - 00029000 * 00030000 * GPR15 = X'00' 00031000 * 00032000 * ALL OTHER REGISTERS UNMODIFIED BY DMTSIG, HOWEVER 00033000 * CERTAIN REGISTERS MAY BE MODIFIED BY THE ALERTED 00034000 * TASK'S ALERT ROUTINE 00035000 * 00036000 * ERROR - 00037000 * 00038000 * GPR15 = X'04' IF NAMED TASK DOES NOT EXIST, OR DOES 00039000 * EXIST AND DOES NOT HAVE AN ACTIVE ALERT EXIT 00040000 EJECT 00041000 * 00042000 * CALLS TO OTHER ROUTINES - 00043000 * 00044000 * ALERT EXIT ROUTINE FOR THE SPECIFIED TASK 00045000 * 00046000 * DMTDSP - TO RESUME DISPATCHED OPERATION 00047000 * 00048000 * EXTERNAL REFERENCES - 00049000 * 00050000 * NONE 00051000 * 00052000 * TABLES / WORKAREAS - 00053000 * 00054000 * DMTVEC - SUPERVISOR COMMON AREA 00055000 * TASK ELEMENT 00056000 * ASYNCH EXIT ELEMENT 00057000 * 00058000 * REGISTER USAGE - 00059000 * 00060000 * 00061000 * GPR0 = TASK NAME 00062000 * GPR1 = UNUSED 00063000 * GPR2 = ASYNCH EXIT ELEMENT POINTER 00064000 * GPR3 = TASK ELEMENT POINTER 00065000 * GPR4 = UNUSED 00066000 * GPR5 = UNUSED 00067000 * GPR6 = UNUSED 00068000 * GPR7 = UNUSED 00069000 * GPR8 = UNUSED 00070000 * GPR9 = UNUSED 00071000 * GPR10 = UNUSED 00072000 * GPR11 = UNUSED 00073000 * GPR12 = UNUSED 00074000 * GPR13 = UNUSED 00075000 * GPR14 = TASK SAVE AREA POINTER 00076000 * GPR15 = ENTRY ADDRESS, AND DMTSIG BASE REGISTER 00077000 * 00078000 * NOTES - 00079000 * 00080000 * ENTRY CONDITIONS TO THE ALERTED TASK'S ALERT EXIT 00081000 * ROUTINE ARE (MASKED OFF, UNDISPATCHED, SUP STATE): 00082000 * 00083000 * GPR0 = NAME OF ALERTING TASK 00084000 * GPR1 -> 12 AS SET BY ALERTING TASK 00085000 * GPR13 = ADDR OF ALERTING TASK'S TASK ELEMENT 00086000 * GPR14 = RETURN ADDRESS 00087000 * GPR15 = ASYNCH EXIT ROUTINE ENTRY ADDRESS 00088000 * 00089000 * OPERATION - 00090000 * 00091000 * THE ALERT EXIT ELEMENT QUEUE IS SCANNED FOR AN ELEMENT 00092000 * BELONGING TO THE TASK NAMED BY THE CALLING (ALERTING) 00093000 * TASK. IF ONE IS FOUND, THE ALERT EXIT CALLING SEQUENCE 00094000 * IS EXECUTED, AND EXIT IS MADE TO THE DISPATCHER WHEN 00095000 * THE ALERT EXIT ROUTINE RETURNS CONTROL. 00096000 * 00097000 *. 00098000 EJECT 00099000 DMTSIG CSECT 00100000 SPACE 00101000 * ENTRY POINT FOR CALL TO DMTSIG ROUTINE 00102000 SPACE 00103000 FREEZE SAVE RESUME PSW AND GREGS FOR DISPATCH LATER 00104000 SPACE 00105000 USING TAREA,R14 DEFINE TASK SAVE AREA DSECT ADDRESSA 00106000 USING DMTSIG,R15 USE ENTRY REGISTER AS BASE 00107000 USING SVECTORS,0 GET SVECTORS ADDRESSABILTIY 00108000 USING TASKE,R3 GET TASK ELEMENT ADDRESSABILITY 00109000 USING ASYNE,R2 GET ASYN ELEMENT ADDRESSABILTIY 00110000 SPACE 00111000 XC TGREG15(4),TGREG15 CLEAR RETURN CODE FOR NOW 00112000 LA R2,ALERTQ-(ASYNNEXT-ASYNE) INITIALIZE REQ EXIT ELEMENT 00113000 ALSCAN EQU * 00114000 ICM R2,B'1111',ASYNNEXT REG 2 = ADDRESS OF NEXT EXIT ELEM 00115000 BZ ALNOGO YEP - RETURN WITH ERROR CODE 00116000 L R3,ASYNTASK REG.3 = ADDR OF TASK ELEMENT OF EXIT OWN 00117000 CL R0,TASKNAME IS THIS EXIT FOR THE REQUESTED TASK? 00118000 BNE ALSCAN NOPE - KEEP LOOKING 00119000 SPACE 00120000 L R13,ASYNTASK REG.13 = ADDRESS OF EXIT'S TASK TABLE 00121000 L R15,ASYNEXIT REG.15 = ADDRESS OF REQUESTED EXIT 00122000 L R2,ACTIVE REG 2 = ADDRESS OF CALLING TASK'S TASK ELEMENT 00123000 DROP R2,R3 00124000 USING TASKE,R2 GET TASK ELEMENT ADDRESSABILITY 00125000 L R0,TASKNAME REG.0 = TASK NAME OF CALLING TASK 00126000 LM R2,R3,TGREG2 RESTORE CALLER'S REG.2 & 3 FOR ASYNCH EXIT 00127000 BALR R14,R15 EXIT TO THE REQUESTED TASK ASYN ALERT ENTRY 00128000 SPACE 00129000 L R15,DISPATCH ON RETURN, SET REG.15 TO DISPATCHER ADDR 00130000 BALR R14,R15 AND RESUME DISPATCHING TASKS 00131000 SPACE 00132000 ALNOGO EQU * 00133000 MVI TGREG15+3,4 SET NOT FOUND CODE IN CALLER'S SAVE AREA 00134000 L R15,DISPATCH REG.15 = ADDRESS OF DISPATCHER ENTRY 00135000 BALR R14,R15 CALL THE DISPATCHER FOR EXIT 00136000 EJECT 00137000 COPY RSSEQU 00138000 EJECT 00139000 COPY SVECTORS 00140000 EJECT 00141000 COPY TAREA 00142000 EJECT 00143000 COPY TASKE 00144000 EJECT 00145000 COPY ASYNE 00146000 END 00147000