Open System Services System Calls Reference Manual (G06.28+, H06.05+)
SPT_WRITEREADX(2) OSS System Calls Reference Manual
NAME
SPT_WRITEREADX - Writes data to a Guardian file from an array and waits for data to be
read back from the file
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 filenum,
char *buffer,
short write_count,
short read_count,
[short *count_read ],
[long tag ]
);
PARAMETERS
filenum specifies the file number of a Guardian file open instance that
identifies the file to be read.
buffer specifies an array in the application process in which the infor-
mation to be written to the file is stored before the call. On
return, buffer contains the information read from the file.
write_count specifies the number of bytes to be written.
read_count specifies 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 file into buffer.
tag is for nowait I/O only. The tag value you define uniquely
identifies 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
WRITEREADX procedure.
The SPT_WRITEREADX( ) function writes data to a file from an array in the application pro-
cess, then waits for data to be transferred back from the file. The data from the read portion
returns in the same array used for the write portion.
If the file 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
Programmer’s Guide and the Guardian Programmer’s Guide.
7−348 Hewlett-Packard Company 527186-007