Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
Guardian Native C Library Calls (n - r) __ns_fopen64_special(3)
NAME
__ns_fopen64_special - Opens an ANSI I/O file to a specified 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 *file_name,
char *access_mode,
short sync_depth);
PARAMETERS
file_name Points to a string containing a valid Guardian filename.
access_mode Points to a string that specifies how you want to access the file. The possible
values for access_mode are described under the subheading "Access Mode
Values."
sync_depth Specifies the number of nonretryable write requests whose completion must be
remembered by the file system. sync_depth must conform to the operating sys-
tem limit of a value in the range of zero through fifteen. A value of 1 or greater
must be specified 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 file without intervening
checkpoints to its backup process. If omitted, or if 0 (zero) is specified, internal
checkpointing does not occur and the file 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 files, the __ns_fopen64_special() function supports Guar-
dian files larger than approximately 4 gigabytes.
An application can explicitly call this function when you use the #define
_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 #define _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 file to a specified 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 file 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 filled or a flush
operation is performed, such as a call to the fflush(), fclose( ),orexit() function. You can disable
buffering with the setvbuf( ) or setbuf( ) function.
527192-018 Hewlett-Packard Company 5−31