TNS/E Native Application Conversion Guide

Converting Programs With Guardian API Calls
TNS/E Native Application Conversion Guide529659-003
10-2
ADDRTOPROCNAME
ADDRTOPROCNAME
The ADDRTOPROCNAME procedure takes a P register value and stack marker ENV
value and returns the associated symbolic procedure name and various optional items
that describe the procedure in detail.
Native processes cannot call the ADDRTOPROCNAME procedure because native
processes do not have P or ENV registers. Remove calls to ADDRTOPROCNAME
from your program. No direct replacement is available, but a comparable service is
provided for accelerated and native programs by the HIST_INIT_, HIST_FORMAT_,
and HIST_GETPRIOR_ procedures.
These three procedures display process state, including register contents and
procedure activation history or stack traces. The HIST_INIT_ procedure called with the
HO_Init_Address option provides results comparable to the ADDRTOPROCNAME
procedure. See the
Guardian Procedure Calls Reference Manual
for details.
ARMTRAP
Native processes cannot call the Guardian procedure ARMTRAP. For native
processes, the trap facility based on the TNS architecture has been replaced with a
different yet comparable signals facility. Native processes receive signals when run-
time events occur that require immediate attention; they cannot receive traps. Signals
are software interrupts that provide a way for handling asynchronous events, such as
timer expiration, detection of a hardware fault, abnormal termination of a process, or
any trap condition normally detectable by a TNS process. Each TNS trap has a
corresponding signal.
Guardian system procedures that previously trapped on error conditions emit signals in
native processes. For details, see the
Guardian Procedure Calls Reference Manual
.
If a program has trap handlers to handle trap conditions, you must write signal
handlers to handle the equivalent signals.
Native programs in the Guardian environment can use these functions and procedures
to receive and handle signals:
Signals functions in the POSIX.1 standard.
These are the signals functions in the OSS API. All of these functions can be
called in C and C++, and most can be called in pTAL.
These functions include longjmp(), raise(), setjmp(), signal(), and
sigaction() in C and LONGJMP_, RAISE_, SETJMP_, SIGNAL_, and
SIGACTION_ in pTAL.
HP signals extensions to the POSIX.1 standard.
These extensions are especially written for applications that focus on handling
signals indicating conditions known as traps in TNS processes (those applications
that call ARMTRAP). These procedures can be called in pTAL, C, and C++.