TNS/E Native Application Conversion Guide

Introduction to Native Mode
TNS/E Native Application Conversion Guide529659-003
1-17
Signals Facility
Signals Facility
Certain critical error conditions occurring during process execution prevent normal
process execution. Most of these error conditions are unrecoverable. In TNS
processes, these errors cause the process to receive a trap. In native processes, these
errors cause the process to receive a signal. Native processes do not receive traps.
Signals are software interrupts that provide a way of 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, although the trap number and the signal number are
different.
The Debug (TNS/R systems only) and Inspect debuggers display a debugging prompt
when a TNS process receives a trap. The Native Inspect and Visual Inspect debuggers
display a prompt when a native process receives a signal only if the process has
previously entered Native Inspect or Visual Inspect (for example, with a TACL RUND
or RUNV command). Otherwise, a termination message with the signal name and
number is displayed. Native Inspect and Native Inspect can be used to display and set
signal information when debugging. For details, see the
Native Inspect Manual
or the
Visual Inspect online help.
For information on signal behavior, see:
ARMTRAP on page 10-2
Guardian Programmers Guide
DLLs
All libraries in the TNS/E native environment are dynamic-link libraries (DLLs). A DLL is
a type of library that is constructed of position-independent code (PIC). PIC is code
that can be relocated in virtual memory at load time without alteration. All references in
PIC files to global or external symbols are made indirectly through addresses stored in
a data area so that the loader can find and bind them to reflect their virtual-memory
location at load time without modifying code. Shared run-time libraries (SRLs), by
contrast, are constructed of non-PIC and are bound to fixed virtual addresses for
execution. They cannot have their addresses modified at load time.
An important attribute of DLLs is that they can be dynamically loaded; that is, a running
program can load a DLL and gain access to its symbols. This capability means that
you do not need to load infrequently loaded DLLs when the application is loaded.
Instead, you can load and use these DLLs when required during execution and unload
them when they are no longer needed.
Like other types of libraries, DLLs provide functions and data needed by a program or
other DLLs. A DLL might be any of these:
A library that supports a single program
A library that is available to a project or a group with common computational needs
A library that is available to all users