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

spt_writevx(2) OSS System Calls Reference Manual
NAME
spt_writevx - Writes to a le from scattered buffers (thread-aware version)
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
[#include <sys/types.h>]
[#include <sys/uio.h>]
#include <spthread.h>
int spt_writevx (
int ledes,
struct iovec *iov,
int iov_count
);
PARAMETERS
filedes Species an open le descriptor obtained from a successful call
to the spt_acceptx(), creat(), dup(), spt_dup2x(),
spt_fcntlx( ), open(), pipe( ), socket(),orsocketpair() function.
iov Points to a iovec structure that identies the buffers containing
the data to be written.
iov_count Species the number of iovec structure entries (buffers) pointed
to by the iov parameter.
DESCRIPTION
The spt_writevx() function is the thread-aware version of the writev( ) function.
The spt_writevx() function attempts to write data to the le associated with the ledes parame-
ter from the set of buffers pointed to by the iov parameter.
The spt_writevx() function performs the same action as the spt_writex() function, but gathers
the output data from the iov_count buffers specied by the iovec structure buffers pointed to by
the iov parameter.
The iovec structure is dened in the sys/uoi.h header le and contains entries with these
members:
caddr_t iov_base;
int iov_len;
The iov_base and iov_len members of each iovec structure entry specify the base address and
length of an area in memory from which data should be written. The spt_writevx() function
always writes a complete buffer before proceeding to the next.
With regular les and devices capable of seeking, the actual writing of data proceeds from the
position in the le indicated by the le pointer. If this incremented le pointer is greater than the
length of the le, the length of the le is set to this le offset. Upon return from the
spt_writevx() function, the le pointer is incremented by the number of bytes actually written.
With devices incapable of seeking, writing always takes place starting at the current position.
For such devices, the value of the le pointer after a call to the spt_writevx() function is always
0 (zero).
Fewer bytes than requested can be written if there is not enough room to satisfy the request. In
7350 Hewlett-Packard Company 527186-005