Guardian Procedure Calls Reference Manual

ARMTRAP Procedure (Superseded by SIGACTION_INIT_ Procedure)
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Functions
Trap Handler Activation and Termination
Considerations
Additional Considerations for Native Systems
OSS Considerations
Example
Related Programming Manual
Summary
NOTE: This procedure cannot be called by OSS or native processes; use the signal procedures.
TNS Guardian processes must continue to use this procedure.
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
#include <cextdecs(ARMTRAP)>
void ARMTRAP ( short traphandlr-addr
,short trapstack-addr );
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.
For details, see the Common Run-Time Environment (CRE) Programmer's Guide.
Syntax for TAL Programmers
CALL ARMTRAP ( traphandlr-addr ! i
,trapstack-addr ); ! i
Parameters
traphandlr-addr
input
INT:value
is a label (nonzero P register value) that identifies a statement in the program where control is
to transfer if a trap occurs.
You can specify zero (0) for traphandlr-addr only in a call from within a trap handler.
Such a call causes the process to resume. For details, see Considerations (page 71).
ARMTRAP Procedure (Superseded by SIGACTION_INIT_ Procedure) 69