Open System Services System Calls Reference Manual (G06.28+)

spt_fushx(2) OSS System Calls Reference Manual
NAME
spt_fushx - Flushes a stream (thread-aware version)
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
[#include <stdio.h>]
#include <spthread.h>
int spt_fushx(
FILE *stream
);
PARAMETERS
stream Species the output or update stream.
DESCRIPTION
The spt_fushx() function is the thread-aware version of the fush() function.
The spt_fushx() function writes any buffered data for the stream specied by the stream param-
eter and leaves the stream open. If stream is a null pointer, the spt_fushx( ) function performs
this ushing action on all streams for which the behavior was previously dened. The st_ctime
and st_mtime elds of the underlying le are marked for update.
NOTES
The macro to map fush() to spt_fushx( ) is available in C applications when
SPT_THREAD_AWARE_NONBLOCK has been dened in the following manner before
including spthread.h:
#dene SPT_THREAD_AWARE_NONBLOCK
The alias to link fush() to spt_fushx( ) is available in C++ applications when
SPT_THREAD_AWARE_PRAGMA_NONBLOCK has been dened in the following manner
before including spthread.h:
#dene SPT_THREAD_AWARE_PRAGMA_NONBLOCK
RETURN VALUES
Upon successful completion, the spt_fushx( ) function returns a value of 0 (zero). Otherwise,
EOF is returned, and errno is set to indicate the error.
If the le descriptor underlying stream becomes invalid (is closed by another thread), EOF is
returned with an errno value of [EBADF]. If a signal is received via the pthread_kill() function
and is not blocked, ignored, or handled, EOF is returned with an errno value of [EINTR].
ERRORS
If any of the following conditions occurs, the spt_fushx( ) function sets errno to the value that
corresponds to the condition.
[EAGAIN] The O_NONBLOCK ag is set for the le descriptor underlying stream and the
process would be delayed in the write operation.
[EBADF] The le descriptor underlying the stream parameter is not valid.
[EFBIG] An attempt was made to write a le that exceeds the processs le size limit or
the maximum le size.
7122 Hewlett-Packard Company 527186-005