# US 2021/0240495 A1 · Signal handling between programs associated with different addressing modes

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0240495 A1
- Document ID: US20210240495A1
- Status: Published application
- Kind: A1
- Application number: 16/782,107
- Filed: 2020-02-05
- Published: 2021-08-05
- Earliest claimed: 2020-02-05
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Ming Ran Liu; Bao Zhang; NAIJIE LI; Jing Lu; Xiao Yan Tang; Kershaw S. Mehta
- Web page: https://patentgrep.com/patent/US20210240495A1

## CPC

- G06F 9/4484: {Executing subprograms}
- G06F 9/30134: {Register stacks; shift registers}
- G06F 9/44505: {Configuring for program initiating, e.g. using registry, configuration files}
- G06F 9/485: {Task life-cycle, e.g. stopping, restarting, resuming execution (G06F9/4881 takes precedence)}
- H04L 49/9094: {Arrangements for simultaneous transmit and receive, e.g. simultaneous reading/writing from/to the storage element}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Techniques for signal handling between programs associated with different addressing modes in a computer system are described herein. An aspect includes, based on a signal occurring during execution of a first program in a first runtime environment, wherein the first program and the first runtime environment are associated with a first addressing mode, invoking a first signal exit routine associated with the first addressing mode. Another aspect includes allocating a signal information area (SIA) by the first signal exit routine. Another aspect includes calling a second signal exit routine associated with a second addressing mode that is different from the first addressing mode with an address of the SIA. Another aspect includes allocating a mirror SIA by the second signal exit routine. Another aspect includes handling the signal, and resuming execution based on the handling of the signal.

## Claims

### Claim 1

A computer-implemented method comprising:
based on a signal occurring during execution of a first program in a first runtime environment, wherein the first program and the first runtime environment are associated with a first addressing mode:
invoking, by a processor of a computer system, a first signal exit routine associated with the first addressing mode;
allocating a signal information area (SIA) by the first signal exit routine;
calling a second signal exit routine associated with a second addressing mode that is different from the first addressing mode with an address of the SIA;
allocating a mirror SIA by the second signal exit routine;
handling the signal; and
resuming execution based on the handling of the signal.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
based on initializing of the first runtime environment associated with the first addressing mode, registering the first signal exit routine with an operating system of the computer system; and
based on initializing of a second runtime environment associated with the second addressing mode, registering the second signal exit routine with the operating system.

### Claim 3 (depends on 2)

The method of claim 2, wherein the first runtime environment comprises a secondary runtime environment, the second runtime environment comprises a parent runtime environment, and the execution of the first program corresponds to a non-nested call from the second runtime environment to the first runtime environment.

### Claim 4 (depends on 3)

The method of claim 3, further comprising:
determining a location of a transition routine stack frame in a first stack of the first runtime environment by the first signal exit routine;
storing a location of a stack frame prior to the transition routine stack frame in the SIA by the first signal exit routine;
determining a signal handler in a second stack of the second runtime environment by the second signal exit routine, wherein the signal handler handles the signal.

### Claim 5 (depends on 2)

The method of claim 2, wherein the first runtime environment comprises a parent runtime environment, the second runtime environment comprises a secondary runtime environment, and the execution of the first program corresponds to a nested call from the second runtime environment to the first runtime environment.

### Claim 6 (depends on 5)

The method of claim 5, comprising:
determining a location of a first transition routine stack frame in a first stack of the first runtime environment by the first signal exit routine;
storing a location of a first stack frame prior to the first transition routine stack frame in the SIA by the first signal exit routine;
determining a location of a second transition routine stack frame in a second stack of the second runtime environment by the second signal exit routine;
storing a location of a second stack frame prior to the second transition routine stack frame in the mirror SIA by the second signal exit routine; and
determining a signal handler in the first stack of the first runtime environment by the first signal exit routine, wherein the signal handler handles the signal.

### Claim 7 (depends on 2)

The method of claim 2, comprising, based on the signal being handled:
collapsing stack frames in a stack from a top stack frame to a resume point, wherein execution is resumed at the resume point.

### Claim 8

A system comprising:
a memory having computer readable instructions; and
one or more processors for executing the computer readable instructions, the computer readable instructions controlling the one or more processors to perform operations comprising:
based on a signal occurring during execution of a first program in a first runtime environment, wherein the first program and the first runtime environment are associated with a first addressing mode:
invoking a first signal exit routine associated with the first addressing mode;
allocating a signal information area (SIA) by the first signal exit routine;
calling a second signal exit routine associated with a second addressing mode that is different from the first addressing mode with an address of the SIA;
allocating a mirror SIA by the second signal exit routine;
handling the signal; and
resuming execution based on the handling of the signal.

### Claim 9 (depends on 8)

The system of claim 8, further comprising:
based on initializing of the first runtime environment associated with the first addressing mode, registering the first signal exit routine with an operating system; and
based on initializing of a second runtime environment associated with the second addressing mode, registering the second signal exit routine with the operating system.

### Claim 10 (depends on 9)

The system of claim 9, wherein the first runtime environment comprises a secondary runtime environment, the second runtime environment comprises a parent runtime environment, and the execution of the first program corresponds to a non-nested call from the second runtime environment to the first runtime environment.

### Claim 11 (depends on 10)

The system of claim 10, further comprising:
determining a location of a transition routine stack frame in a first stack of the first runtime environment by the first signal exit routine;
storing a location of a stack frame prior to the transition routine stack frame in the SIA by the first signal exit routine;
determining a signal handler in a second stack of the second runtime environment by the second signal exit routine, wherein the signal handler handles the signal.

### Claim 12 (depends on 9)

The system of claim 9, wherein the first runtime environment comprises a parent runtime environment, the second runtime environment comprises a secondary runtime environment, and the execution of the first program corresponds to a nested call from the second runtime environment to the first runtime environment.

### Claim 13 (depends on 12)

The system of claim 12, comprising:
determining a location of a first transition routine stack frame in a first stack of the first runtime environment by the first signal exit routine;
storing a location of a first stack frame prior to the first transition routine stack frame in the SIA by the first signal exit routine;
determining a location of a second transition routine stack frame in a second stack of the second runtime environment by the second signal exit routine;
storing a location of a second stack frame prior to the second transition routine stack frame in the mirror SIA by the second signal exit routine; and
determining a signal handler in the first stack of the first runtime environment by the first signal exit routine, wherein the signal handler handles the signal.

### Claim 14 (depends on 9)

The system of claim 9, comprising, based on the signal being handled:
collapsing stack frames in a stack from a top stack frame to a resume point, wherein execution is resumed at the resume point.

### Claim 15

A computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a processor to cause the processor to perform operations comprising:
based on a signal occurring during execution of a first program in a first runtime environment, wherein the first program and the first runtime environment are associated with a first addressing mode:
invoking a first signal exit routine associated with the first addressing mode;
allocating a signal information area (SIA) by the first signal exit routine;
calling a second signal exit routine associated with a second addressing mode that is different from the first addressing mode with an address of the SIA;
allocating a mirror SIA by the second signal exit routine;
handling the signal; and
resuming execution based on the handling of the signal.

### Claim 16 (depends on 15)

The computer program product of claim 15, further comprising:
based on initializing of the first runtime environment associated with the first addressing mode, registering the first signal exit routine with an operating system; and
based on initializing of a second runtime environment associated with the second addressing mode, registering the second signal exit routine with the operating system.

### Claim 17 (depends on 16)

The computer program product of claim 16, wherein the first runtime environment comprises a secondary runtime environment, the second runtime environment comprises a parent runtime environment, and the execution of the first program corresponds to a non-nested call from the second runtime environment to the first runtime environment.

### Claim 18 (depends on 17)

The computer program product of claim 17, further comprising:
determining a location of a transition routine stack frame in a first stack of the first runtime environment by the first signal exit routine;
storing a location of a stack frame prior to the transition routine stack frame in the SIA by the first signal exit routine;
determining a signal handler in a second stack of the second runtime environment by the second signal exit routine, wherein the signal handler handles the signal.

### Claim 19 (depends on 16)

The computer program product of claim 16, wherein the first runtime environment comprises a parent runtime environment, the second runtime environment comprises a secondary runtime environment, and the execution of the first program corresponds to a nested call from the second runtime environment to the first runtime environment.

### Claim 20 (depends on 19)

The computer program product of claim 19, comprising:
determining a location of a first transition routine stack frame in a first stack of the first runtime environment by the first signal exit routine;
storing a location of a first stack frame prior to the first transition routine stack frame in the SIA by the first signal exit routine;
determining a location of a second transition routine stack frame in a second stack of the second runtime environment by the second signal exit routine;
storing a location of a second stack frame prior to the second transition routine stack frame in the mirror SIA by the second signal exit routine; and
determining a signal handler in the first stack of the first runtime environment by the first signal exit routine, wherein the signal handler handles the signal.
