TNS/E Native Application Conversion Guide
Converting Programs With Guardian API Calls
TNS/E Native Application Conversion Guide—529659-003
10-9
Using Procedures With pTAL Address Types
Using Procedures With pTAL Address Types
These procedures use pTAL data types that support the address types WADDR,
BADDR, EXTADDR, and PROCPTR:
When converting TAL programs, use the pTAL compiler SYNTAX directive to enable
syntax checking. That detects whether the program requires changes.
C and C++ programs do not require changes.
For more details, see the procedure’s description in the
Guardian Procedure Calls
Reference Manual
.
Writing Multithreaded Programs
Native processes do not maintain the TNS register and stack architecture. Therefore,
user-written multithreaded programs that directly manipulate TNS registers and the
stack require changes to be converted to native mode. Programs must use a new set
of multithreaded support procedures. The multithreaded support procedures enable
programs to save and restore thread context and to create the context for new threads.
Both TNS and native programs can use the multithread support procedures. See
Support Note S96001, “T9050: User-Level TNS/R Native Thread Primitives” for details.
Calling Code You Add to the System Library
If a TNS program calls code that you have added to the system library, the code added
to the system library must be converted to TNS/E native code when you convert the
program.
If both TNS processes (running in interpreted mode or accelerated mode) and native
processes call code you add to the system library, you need two versions of the code:
one that has been accelerated and one that has been compiled with a TNS/E native
compiler. The accelerated and TNS/E native versions can contain the same procedure
ADDRESS_DELIMIT_ INITIALIZER SORTERROR
AWAITIO MEASWRITE_DIFF_ SORTERRORDETAIL
AWAITIOX NUMIN SORTERRORSUM
CHECK^FILE POOL_CHECK_ SORTMERGEFINISH
DNUMIN PROCESS_SPAWN_ SORTMERGERECEIVE
ENFORMSTART SEGMENT_ALLOCATE_ SORTMERGESEND
GETPOOL SEGMENT_GETINFO_ SORTMERGESTART
HEAPSORT SEGMENT_USE_ SORTMERGESTATISTICS
HEAPSORTX SET^FILE










