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

System Functions (s and S) SPT_WRITEREADX(2)
NAME
SPT_WRITEREADX - writes data to a Guardian le from an array and waits for data to be read
back from the le
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
[#include <cextdecs.h>]
#include <spthread.h>
short SPT_WRITEREADX (
short lenum,
char *buffer,
short write_count,
short read_count,
[short *count_read ],
[long tag ]
);
PARAMETERS
filenum species the le number of a Guardian le open that identies
the le to be read.
buffer species an array in the application process in which the infor-
mation to be written to the le is stored before the call. On
return, buffer contains the information read from the le.
write_count species the number of bytes to be written.
read_count species the number of bytes to be read.
count_read is for waited I/O only. This parameter returns a count of the
number of bytes returned from the le into buffer.
tag is for nowait I/O only. The tag value you dene uniquely
identies the operation associated with this call.
This parameter is supported only for program compatibility; if
you provide it, it is ignored.
DESCRIPTION
The SPT_WRITEREADX( ) function is the thread-aware version of the Guardian WRI-
TEREADX procedure.
The SPT_WRITEREADX( ) function writes data to a le from an array in the application pro-
cess, then waits for data to be transferred back from the le. The data from the read portion
returns in the same array used for the write portion.
If the le is opened for nowait I/O, you must not modify the buffer before the I/O completes with
a call to the Guardian AWAITIOX procedure. This condition also applies to other processes that
might be sharing the segment. The application must ensure that the buffer used in the call to the
SPT_WRITEREADX() function is not reused before the I/O completes with a call to
AWAITIOX.
For programming information about the WRITEREADX procedure, see the Enscribe
Programmers Guide and the Guardian Programmers Guide.
527186-005 Hewlett-Packard Company 7335