Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

System Functions (s and S) spt_writev(2)
NAME
spt_writev - Initiate thread-aware writev( ) function
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
#include <spthread.h>
ssize_t spt_writev(
int filedes,
struct iovec *iov,
int iov_count);
PARAMETERS
See the writev(2) reference page.
DESCRIPTION
This is a thread-aware version of the writev() function. The file descriptor must be nonblocking
for this function to be thread-aware.
For C applications, a macro to map write( ) to spt_writev() is available when you use the
#define SPT_THREAD_AWARE preprocessor directive before including spthread.h or when
you use an equivalent compiler command option to compile the application.
For C++ applications, an alias to map write( ) to spt_writev() is available when you use the
#define SPT_THREAD_AWARE_PRAGMA preprocessor directive before including
spthread.h or when you use an equivalent compiler command option to compile the application.
RETURN VALUES
See the writev(2) reference page. The following also applies:
The value of errno is never set to [EWOULDBLOCK] or [EAGAIN].
If the file descriptor becomes invalid (is closed by another thread), -1 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, -1 is returned with an errno value of [EINTR].
STANDARDS CONFORMANCE
HP extensions to the XPG4 Version 2 specification are:
The errno values [ECONNRESET], [EFAULT], [EGUARDIANLOCKED], [EINVAL],
[ENETDOWN], [ENOTCONN], [ETIMEDOUT], and [EWRONGID] can be returned.
527186-023 Hewlett-Packard Company 7465