¿ªÔÆÌåÓý

Re: Program Interrupts (signals)


 

dave,

i didnt?mean that CP would abend. i meant that the PIC would be thrown by CP. Sorry for the confusion.

Joe

On Thu, Apr 23, 2020 at 6:02 AM Dave Wade <dave.g4ugm@...> wrote:

Joe,

?

How can CP ABEND? Really CP is a distraction in this case AND CAN BE IGNORED. Saying CP ABENDS is like saying MVS abends when a program interrupts. Certainly, CP will receive control because CMS is running in REAL problem state.

But CP will simulate the effect of the divide by zero and pass control to the address specified in the VM¡¯s low storage location, just as if CMS was running on real hardware .

?A program running in a VM always runs in real problem state. If its in virtual supervisor state then CP has to simulate any operations the VM carries out that require real supervisor state, converting between real/virtual addresses as required.

In this case CMS is un-aware that CP got involved. All it knows is it plugged an address, as part of a new PSW into the appropriate low store location, a pic 9 has occurred, and execution has transferred to the handler pointed to by the new PSW.

The address where the exception occurred will be part of the old psw in the VM¡¯s low store. S/370 hardware is designed so that any operation that could allow the supervisor state to be examined is a privileged instruction. ?

?This is not true for XA onwards which is why you need SIE for VM on these architectures¡­..

?

Adrian,

?

Sadly my searches indicate that catching HX needs a CMS mod.

?

?

(note that¡¯s SP3 that¡¯s mentioned in there which is much later than R6)

?

Dave

?

From: [email protected] <[email protected]> On Behalf Of Joe Monk
Sent: 23 April 2020 11:26
To: [email protected]
Subject: Re: [h390-vm] Program Interrupts (signals)

?

I think?you might be slightly confused.

?

Lets take the example of a divide by zero.

?

CMS will not abend that. Rather, CP will because its a hardware abend.?You will get a PIC 9.?CMS will detect it and take action by default, which may be undesirable. Within a C runtime, you can trap a PIC 9 by issuing a SPIE, and specifying?an exit to take.

?

SPIE stands for Set Program Interrupt Exit.?

?

So, as part of your C runtime prolog, you issue an SPIE for PIC 9 before you give control to main, and set a branch to a location where you have the ability to cleanly close any IO in process and de-allocate?any memory before termination by the C runtime epilog.

?

Joe

?

On Thu, Apr 23, 2020 at 4:58 AM adriansutherland67 <adrian@...> wrote:

On Thu, Apr 23, 2020 at 09:52 AM, Dave Wade wrote:

Doesn¡¯t SPIE cover all of these. Also STAE is available

You see - I have no idea really! I can only follow advice. There are two additional concerns, which are specific if GCCLIB.

1/ If a CMS Abent clears freemen (and I think it doesn't?), we have a bit of a problem because multiple programs memory will be trashed so I would seek to stop the CMS ABEND and instead just close the program if that makes sense?

2/ HX ... how can I convert that to a signal?

Join [email protected] to automatically receive all group messages.