This manual describes the programming environment of the
Tru64TM UNIX
operating system, with an emphasis on the C programming language.
The availability
of other programming languages on any system is determined by the choices
made at the time the system was configured or modified.
Audience
This manual addresses all programmers who use the Tru64 UNIX operating
system to create or maintain programs in any supported language.
New and Changed Features
In addition to many corrections and revisions throughout this manual, the following major changes and additions have been made for the Version 5.1 release of Tru64 UNIX:
Chapter 2 -- Section 2.9, Inline Assembly Code (ASMs), has been added.
Chapter 3
-- Three new sections, for
pragma assert
,
pragma extern_model
, and
pragma optimize
have been added.
The section on
pragma
use_linkage
has been modified: you can now associate a
typedef
name with a linkage.
Chapter 8 -- Section 8.4, Automatic and Profile-Directed Optimization, has moved to Section 10.1, which covers all automatic optimization techniques.
Chapter 9 -- Documentation on the new -gap and -gpa options has been added.
Chapter 10
--
Section 10.1
has been revised to centralize all automatic optimization techniques.
It now
includes use of the new
spike
tool and information that
was formerly in
Chapter 8
about automatic and profile-directed
optimization.
Because
spike
is intended to replace the
cc
command's
-om
option and the
cord
utility, these older tools are now described in the new
Appendix F.
Chapter 14 -- A new section, Section 14.7.8 Choosing a Connection Policy, has been added. Example 14-3 has been modified. Example 14-4 has been replaced. Section 14.5.1.1 and Section 14.5.1.1.1 have been completely revised. A detailed description of date and time variables has been added to Section 14.8.1.
Appendix F
-- This new appendix contains
information that was formerly in
Chapter 8
and
Chapter 10
about using the
cc
command's
-om
option
and the
cord
utility.
The
spike
tool,
described in
Section 10.1.3, is replacing them.
This manual contains 14 chapters and 6 appendixes.
Chapter 1 | Describes the phases of program development and which programming tools to use during those phases. |
Chapter 2 | Describes the tools that make up the compiler system and how to use them. Topics covered include compiler commands, preprocessors, compilation options, multilanguage programs, and the archiver. |
Chapter 3 | Describes the implementation-specific pragmas that the C compiler supports. |
Chapter 4 | Describes the use, creation, and maintenance of shared libraries and discusses how symbols are resolved. |
Chapter 5 | Describes how to use the
dbx
debugger.
It includes information about the
dbx
commands,
working with the monitor, setting breakpoints, and debugging machine code. |
Chapter 6 | Describes how to use the
lint
command to produce clean code. |
Chapter 7 | Describes how to use the Third Degree tool to perform memory access checks and leak detection on an application program. |
Chapter 8 | Describes how to use various tools and techniques to profile your code, enabling you to find which portions of code are consuming the most execution time. It also describes how to feed profiling data back to the C compiler to provide some automatic optimization of the code. |
Chapter 9 | Describes how to use prepackaged Atom tools to instrument an application program for various purposes, such as to obtain profiling data or to perform cache-use analysis. It also describes how you can design and create custom Atom tools. |
Chapter 10 | Describes how to optimize your code using
the optimizer and the
spike
postlink optimizer. |
Chapter 11 | Describes how to use the features of the C compiler to write a structured exception handler or a termination handler. |
Chapter 12 | Describes how to develop multithreaded programs. |
Chapter 13 | Describes some programming considerations associated with using the OpenMP parallel-processing interface. |
Chapter 14 | Describes how to use the Event Manager utility to post and receive event notifications. |
Appendix A | Describes how to use 32-bit pointers on a Tru64 UNIX system. |
Appendix B | Describes how to achieve source code compatibility for C language programs in the System V habitat. |
Appendix C | Describes how to write dynamically configurable kernel subsystems. |
Appendix D | Describes the old-style parallel processing pragmas implemented before OpenMP. |
Appendix E | Describes the routines that handle conversions between the old-style and new-style names of device special files. |
Appendix F | Describes how to optimize a program with
the
cc
command's
-om
and
-cord
options. |
In addition to this manual, the following manuals contain information pertaining to program development:
Programming: General
Calling Standard for Alpha Systems
Assembly Language Programmer's Guide
Compaq Portable Mathematics Library
Writing Software for the International Market
Alpha Architecture Reference Manual, 2nd Edition (Butterworth-Hinemann Press, ISBN:1-55558-145-5)
Programming: Realtime
Programming: Streams
Programmer's Guide: STREAMS
Programming: Multithreaded Applications
Guide to the POSIX Threads Library
OpenMP C and C++ Application Programming
Interface specification, available on the Internet from
http://www.openmp.org/specs/
.
General User Information
Release Notes
Icons on Tru64 UNIX Printed Manuals
The printed version of the Tru64 UNIX documentation uses letter icons on the spines of the manuals to help specific audiences quickly find the manuals that meet their needs. (You can order the printed documentation from Compaq.) The following list describes this convention:
G | Manuals for general users |
S | Manuals for system and network administrators |
P | Manuals for programmers |
R | Manuals for reference page users |
Some manuals in the documentation help meet the needs of several audiences. For example, the information in some system manuals is also used by programmers. Keep this in mind when searching for information on specific topics.
The
Documentation Overview
provides
information on all of the manuals in the Tru64 UNIX documentation set.
Reader's Comments
Compaq welcomes any comments and suggestions you have on this and other Tru64 UNIX manuals.
You can send your comments in the following ways:
Fax: 603-884-0120 Attn: UBPG Publications, ZKO3-3/Y32
Internet electronic mail:
readers_comment@zk3.dec.com
A Reader's Comment form is located on your system in the following location:
/usr/doc/readers_comment.txt
Please include the following information along with your comments:
The full title of the manual and the order number. (The order number appears on the title page of printed and PDF versions of a manual.)
The section numbers and page numbers of the information on which you are commenting.
The version of Tru64 UNIX that you are using.
If known, the type of processor that is running the Tru64 UNIX software.
The Tru64 UNIX Publications group cannot respond to system problems or
technical support inquiries.
Please address technical questions to your
local system vendor or to the appropriate Compaq technical support office.
Information provided with the software media explains how to send problem
reports to Compaq.
Conventions
%
$
A percent sign represents the C shell system prompt. A dollar sign represents the system prompt for the Bourne, Korn, and POSIX shells.
#
A number sign represents the superuser prompt.
%
cat
Boldface type in interactive examples indicates typed user input.
Italic (slanted) type indicates variable values, placeholders, and function argument names.
In syntax definitions, brackets indicate items that are optional and braces indicate items that are required. Vertical bars separating items inside brackets or braces indicate that you choose one item from among those listed.
colored
text
In syntax definitions, literal elements are colored green. Variable values, placeholders, and function argument names are colored red. No special colored text is used outside of syntax descriptions.
In syntax definitions, a horizontal ellipsis indicates that the preceding item can be repeated one or more times.
cat
(1)A cross-reference to a reference page includes the appropriate section
number in parentheses.
For example,
cat
(1)
indicates that you can find information on the
cat
command in Section 1 of the reference pages.
In an example, a key name enclosed in a box indicates that you press that key.
This symbol indicates that you hold down the first named key while pressing the key or mouse button that follows the slash. In examples, this key combination is enclosed in a box (for example, [Ctrl/C] ).