Guardian Native C Library Calls Reference Manual (G06.28+, H06.05+)

Guardian Native C Library Calls (n - r) __ns_fopen64_special(3)
NAME
__ns_fopen64_special - Opens an ANSI I/O le to a specied sync depth
LIBRARY
G-series native nonPIC Guardian processes: $SYSTEM.SYSTEM.CRTLNS
G-series native PIC Guardian processes: $SYSTEM.SYSTEM.CRTLNS2
H-series native Guardian processes: $SYSTEM.ZDLLnnn.CRTLNSE
SYNOPSIS
#include <crtlns.h>
FILE *__ns_fopen64_special (
char *le_name,
char *access_mode,
short sync_depth);
PARAMETERS
file_name Points to a string containing a valid Guardian lename.
access_mode Points to a string that species how you want to access the le. The possible
values for access_mode are described under the subheading "Access Mode
Values."
sync_depth Species the number of nonretryable write requests whose completion must be
remembered by the le system. sync_depth must conform to the operating sys-
tem limit of a value in the range of zero through fteen. A value of 1 or greater
must be specied to recover from a path failure occuring during a write opera-
tion. The value of sync_depth also implies the number of write operations that
the primary process in a process pair can perform to this le without intervening
checkpoints to its backup process. If omitted, or if 0 (zero) is specied, internal
checkpointing does not occur and the le system does not automatically retry
disk path failures.
DESCRIPTION
The __ns_fopen64_special( ) function is similar to the __ns_fopen_special() function except
that, in addition to supporting smaller les, the __ns_fopen64_special() function supports Guar-
dian les larger than approximately 4 gigabytes.
An application can explicitly call this function when you use the #dene
_LARGEFILE64_SOURCE 1 feature test macro or an equivalent compiler command option to
compile the application.
An application call to __ns_fopen_special() is automatically mapped to this function when you
use the #dene _FILE_OFFSET_BITS 64 feature test macro or an equivalent compiler com-
mand option to compile the application.
The __ns_fopen64_special( ) function opens an ANSI I/O le to a specied sync depth.
You can call this function within Guardian processes only. When used in a program compiled by
the TNS compiler, only Guardian modules (modules compiled for the Guardian environment) can
call this function.
Other than allowing you to specify the sync depth, the __ns_fopen64_special() function
operates the same way as the fopen64( ) function.
For buffered le operations, a call to a write function in user code does not necessarily
correspond to one write operation at the operating system level where the sync-depth value is
meaningful. An operating system write operation is performed if the buffer is lled or a ush
operation is performed, such as a call to the fush(), fclose(),orexit() function. You can disable
buffering with the setvbuf() or setbuf() function.
527192-007 Hewlett-Packard Company 515