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
Native Migration Overview
Open System Services Porting Guide—520573-006
10-2
Native Environment Features
HP supports development tools for native mode programs. These tools differ from
those used to develop TNS programs, and are available in the OSS environment as
well as some workstation environments. User libraries, SRLs, and DLLs are supported
in TNS/R native mode. TNS/E native mode supports DLLs and user libraries (actually a
DLL), but not SRLs. To work with the c89 utility, several tools are provided for building
and analyzing native programs: The TNS/R environment provides two native linkers
(ld for position-independent code [PIC] files, nld for non-PIC files) and a native object
file tool (noft); the TNS/E environment provides a native linker (eld) and a native
object file tool (enoft).
Some restrictions exist for the native mode environments. There is limited support for
mixed-language programming: only C, C++, and pTAL are supported. You cannot mix
TNS interpreted, TNS accelerated, or native object files in one program file. Embedded
SQL, which is supported in TAL and C, is not supported in pTAL. No embedded SQL
can be included in a user library, which is a dynamic-link library (for PIC programs) or a
shared run-time library (for non-PIC programs).
A TNS/R native C and C++ migration tool aids the programmer in migrating an
application from a TNS environment to a TNS/R native environment. This tool is
discussed in the TNS/R Native Application Migration Guide. The TNS/E environment
does not provide such a tool, but once a TNS program has been migrated to TNS/R
native mode, few or no changes are needed to then migrate the TNS/R native program
to the TNS/E native environment. Usually, the only required action is to recompile the
program using a TNS/E native compiler. Migrating a TNS program directly to TNS/E
native mode is very similar to migrating it to TNS/R native mode in terms of the source
code changes required.
In planning the migration of your programs to a native environment, you should focus
on programs that have the following qualities:
•
Spend a significant amount of time in user code, not system code
•
Are critical to application performance
•
Are processor-intensive and not I/O bound
In the G-series OSS and Guardian environments, and in the H-series Guardian
environment, the decision to migrate to native mode is similar to the decision to use the
G-series Accelerator or H-series Object Code Accelerator for TNS programs.
On H-series systems, the Guardian environment supports execution of TNS interpreted
or accelerated programs, but the OSS environment does not. Therefore, if you are
migrating a G-series OSS TNS program to an H-series system, you must migrate the
program to TNS/E native mode.
Native Environment Features
The following subsections discuss the native environment features:
•
Stack and Heap Sizes on page 10-3
•
Kernel-Managed Swap Facility (KMSF) on page 10-3
•
Native Shared Run-Time Libraries on page 10-3