Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (A-B)
Guardian Procedure Calls Reference Manual—522629-013
2-34
ARMTRAP Procedure
(Superseded by SIGACTION_INIT_ Procedure )
ARMTRAP Procedure
(Superseded by SIGA CTION _INIT_ Procedure
)
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
ARMTRAP Functions
Trap Handler Activation and Termination
Considerations
Additional Considerations for Native Systems
OSS Considerations
Example
Related Programming Manual
Summary
The ARMTRAP procedure is used to specify a trap handler (that is, a location within
the application program where execution begins if a trap occurs) and also to return
from a trap handler.
Syntax for C Programmers
There are restrictions on calling the ARMTRAP procedure from a C program due to the
fact that all C programs run under the Common Run-Time Environment (CRE).
It is not possible to express a trap handler in C. The use of ARMTRAP in C programs
is limited to calling ARMTRAP(-1,-1) to turn off trap handling by overriding the trap
handler installed by the CRE in a TNS Guardian C program.
Refer to the
Common Run-Time Environment (CRE) Programmer’s Guide for details.
Syntax for TAL Programmers
Note. This procedure cannot be called by OSS or native processes; use the signal
procedures. TNS Guardian processes must continue to use this procedure.
#include <cextdecs(ARMTRAP)>
void ARMTRAP ( short traphandlr-addr
,short trapstack-addr );
CALL ARMTRAP ( traphandlr-addr ! i
,trapstack-addr ); ! i