You should be able to specify the attribute that turns off ARMODE for a given function. Here is the relevant text in the Metal C Programming Guide that describes it:
To override the effect of the ARMODE option and selectively re-set particular
functions to be in non-AR mode (or primary address space control mode), use
__attribute__((noarmode)). For more information on this attribute, see armode |
noarmode type attribute (C only) and z/OS Metal C Programming Guide and
Reference.
When NOARMODE is in effect, functions are not in AR mode unless
__attribute__((armode)) is specifically specified for the functions.
----------------------------------------------
Answered by dinoxlc on Oct. 30, 2018
----------------------------------------------