Open System Services Porting Guide (G06.24+, H06.03+)
Table Of Contents
- What’s New in This Manual
- About This Manual
- 1 Introduction to Porting
- 2 The Development Environment
- 3 Useful Porting Tools
- 4 Interoperating Between User Environments
- Purpose of Interoperability
- The OSS User Environment
- OSS Commands for the Guardian User
- Guardian Commands for the UNIX User
- OSS Pathname and Guardian Filename Conversions
- Running the OSS Shell and Commands From TACL
- Running Guardian Commands From the OSS Shell
- Running OSS Processes With Guardian Attributes
- Using OSS Commands to Manage Guardian Objects
- 5 Interoperating Between Programming Environments
- 6 OSS Porting Considerations
- 7 Porting UNIX Applications to the OSS Environment
- 8 Migrating Guardian Applications to the OSS Environment
- General Migration Guidelines
- C Compiler Issues for Guardian Programs
- Using New and Extended Guardian Procedures
- Using OSS Functions in a Guardian Program
- Interoperating With OSS Programs
- Starting an OSS Program From the Guardian Environment
- C Compiler Considerations for OSS Programs
- Porting a Guardian Program to the OSS Environment
- How Arguments Are Passed to the C or C++ Program
- Differences in the Two Run-Time Environments
- Which Run-Time Routines Are Available
- Use of Common Run-Time Environment (CRE) Functions
- Replacing Guardian Procedure Calls With Equivalent OSS Functions
- Which IPC Mechanisms Can Be Used
- Interactions Between Guardian and OSS Functions
- 9 Porting From Specific UNIX Systems
- 10 Native Migration Overview
- 11 Porting or Migrating Sockets Applications
- 12 Porting Threaded Applications
- A Equivalent OSS and UNIX Commands for Guardian Users
- B Equivalent Guardian Commands for OSS and UNIX Users
- C Equivalent Inspect Debugging Commands for dbx Commands
- D Equivalent Native Inspect Debugging Commands for dbx Commands
- E Standard POSIX Threads Functions: Differences Between the Previous and Current Standards
- Glossary
- Index
Open System Services Porting Guide—520573-006
10-1
10
Native Migration Overview
This section is intended for OSS and Guardian C or C++ programmers who are
interested in migrating their programs from the TNS environment to the TNS/R or
TNS/E native environment. It contains an overview of the major areas in which
differences exist between the two systems’ development tools, and between the TNS
and native execution environments. Refer to the C/C++ Programmer’s Guide, the
Open System Services Programmer’s Guide, and the Guardian Programmer’s Guide
for detailed information about writing programs for the native environments.
Open System Services (OSS) supports native-mode applications written in C, C++,
and pTAL for the native environments. Programs written for D3x RVUs can still run the
native environments in TNS interpreted or accelerated mode, but benefits can be
achieved by migrating these programs to native mode. It is faster to compile programs
in native mode than to compile and accelerate programs in TNS accelerated mode.
The TNS/R and TNS/E native C compilers accept programs written in Common C as
well as those written in ISO/ANSI C. More OSS and Guardian API interoperability is
provided in the OSS and Guardian APIs that use the native environments.
You need to be concerned about the TNS and native C compiler development and
debugging tools, the differences in the C language syntax supported by the TNS and
native compilers, the differences in the C run-time library routines, and differences in
the Guardian API that supports the native environments. More detailed information to
help you migrate your applications to run in native mode is available in the TNS/R
Native Application Migration Guide and the H-Series Application Migration Guide.
The topics included in this section are:
•
General Migration Issues on page 10-1
•
Native Environment Features on page 10-2
•
C Development Tools on page 10-4
•
User Library Migration Issues on page 10-5
•
C Language Compilers on page 10-6
•
Using the C Run-Time Library on page 10-7
•
Guardian Procedure Features on page 10-9
•
TAL to pTAL Conversion on page 10-10
General Migration Issues
TNS/R and TNS/E native environments support three execution environment modes:
TNS interpreted, TNS accelerated, and native mode. Major differences among these
modes include support for the Kernel-Managed Swap Facility (KMSF), shared run-time
libraries (SRLs), dynamic-link libraries (DLLs), and signals replacing traps in the
Guardian environment.