US 12,346,701 B2
Sharing global variables between addressing mode programs
Xiao Yan Tang, Beijing (CN); Naijie Li, Beijing (CN); Jing Lu, Beijing (CN); Ming Ran Liu, Beijing (CN); Yuan Zhai, Beijing (CN); and Kershaw S. Mehta, Poughkeepsie, NY (US)
Assigned to International Business Machines Corporation, Armonk, NY (US)
Filed by International Business Machines Corporation, Armonk, NY (US)
Filed on Nov. 3, 2021, as Appl. No. 17/518,069.
Prior Publication US 2023/0136606 A1, May 4, 2023
Int. Cl. G06F 9/445 (2018.01); G06F 9/30 (2018.01); G06F 9/50 (2006.01); G06F 12/02 (2006.01)
CPC G06F 9/44505 (2013.01) [G06F 9/3004 (2013.01); G06F 9/5016 (2013.01); G06F 12/0238 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A computer-implemented method, comprising:
recording, by a first program of an application executing on one or more processing units, an allocated address to a global variable in a global variable share area (GVSA), wherein the first program is associated with a first addressing mode and the first program is configured to specify the global variable in the first program to be shared across different addressing modes;
passing, by the one or more processing units, an address of the GVSA to a second program of the application that is loaded after the first program has been loaded, wherein the second program is associated with a second addressing mode different from the first addressing mode and the second program specifies the global variable in the second program to be shared across different addressing modes;
retrieving, by the second program executing on the one or more processing units, the allocated address to the global variable from the GVSA based on the address of the GVSA;
accessing, by the second program, the global variable based on the retrieved allocated address, and
executing based on accessing the global variable, the second program, wherein the second program an addressing mode different from the first program.