Guardian Procedure Calls Reference Manual
Header Files for Guardian Procedure
Like all procedures in an application program, HP-supplied Guardian procedures must be declared
before they can be called. A header file is a collection of declarations to facilitate compiling other
source code that uses those declarations. Header files in $SYSTEM.SYSTEM contain many of the
Guardian procedure declarations for each programming language. For example:
• TAL and pTAL external procedure declarations are in $SYSTEM.SYSTEM.EXTDECS0.
• C function prototypes are in $SYSTEM.SYSTEM.CEXTDECS (usually referred to as the cextdecs
file).
Many other header files also contain Guardian procedure declarations; most, but not all are in
$SYSTEM.SYSTEM.
Your application should include the appropriate compiler directives specifying the names of the
appropriate header files for the Guardian procedures that your application calls. The applicable
compiler directive must precede the first invocation of each procedure. For information about
compiler directives, see your programming language reference manual. For example:
• See the pTAL Reference Manual for details on using the SOURCE compiler command with the
TAL and pTAL programming languages.
• See the C/C++ Programmer's Guide for details on using the #include compiler command
with the C and C++ programming languages.
Traditionally, Guardian external procedures have been declared in EXTDECS0 and cextdecs.
Related structure or constant definitions may appear in other header files. Many, but not all, data
definitions are released in Z*DDL derivatives
1
, such as ZSYSC and ZGRDTAL. As a counter-example,
supporting definitions for PROCESS_LAUNCH_ appear in DLAUNCH[.h] (with different identifiers
from corresponding declarations in ZSYS*).
More recent practice has been to define an entire interface (constants, structures, procedures,
macros) in a single header file. For example:
• $SYSTEM.ZGUARD.HSETJMP contains pTAL declarations for procedures for SETJMP_,
LONGJMP_ and related procedures, which are synonyms for setjmp(), lomgjmp() and
so on, plus related data declarations. (Note that the ZGUARD subvolume is distributed in the
RVU but its installation is optional.)
• $SYSTEM.SYSTEM.HTDMSIG contains pTAL declarations for HP NonStop extensions to the
signal-handling interface.
The setjmp.h and tdmsig.h header files contain the equivalent C language declarations.
Additional examples include HSIGNAL/signal.h, KFPIEEE[.h], KMEM[.h], and KPOOL64[.h]; this
list is far from exhaustive.
Some procedures are defined both in an extdecs file and another header file; sometimes the two
declarations are not compatible. Therefore, it is recommended that you include only one declaration
of a procedure in a compilation. For example, if you include kbinsem.h, do not include the entire
cextdecs file, but rather include only explicit cextdecs sections for the functions you are using that
are not declared in kbinsem.h (or some other header file that you have included).
By default, the procedure syntax descriptions for TAL and pTAL throughout this manual assume that
one of the header files (EXTDECS0, EXTDECS1, or EXTDECS) on $SYSTEM.SYSTEM was sourced.
Similarly, syntax descriptions for C assume by default that cextdecs was included. Where a different
header file is needed, the appropriate ?SOURCE or #include compiler directive is shown with the
syntax.
1. DDL is a data definition language, available to users and used by many NonStop products. The subvolume
$SYSTEM.ZSPIDEF contains many files named Z*DDL and their derivatives, where the * represents a three-character
infix designating a subsystem, such as SYS, GRD, CLK, CRE, EMS, FIL. The ZSYS* files are also in $SYSTEM.ZSYSDEFS.
A file named Z*DLL is a specification in a COBOL-like language, from which the DDL compiler derives a set of header
files in various languages, including TAL and C. As closely as possible, the same structures and constants are defined
in each language. In TAL and C, the hyphen separators (-) in DDL identifiers are translated as circumflex (^) or underscore
(_), respectively. In TAL derivatives, letters are uppercase; in C derivatives, letters are uppercase in literals and lowercase
in structure and structure field identifiers. For more details, see the DDL Reference Manual.
32 Introduction to Guardian Procedure Calls