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

PUT_FILE_WRITEREAD_(2) OSS System Calls Reference Manual
NAME
PUT_FILE_WRITEREAD_ - Writes data to a process previously opened from an array and
waits for data to be transferred back from the process
LIBRARY
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zputdll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yputdll
SYNOPSIS
[#include <cextdecs.h>]
#include <pthread.h>
short PUT_FILE_WRITEREAD_ (
short filenum,
char *write_buffer,
char *read_buffer,
int write_count,
int read_count,
int *count_read,
long tag);
PARAMETERS
Input
filenum Specifies the file number of a Guardian file open instance that identifies the file
to be read.
write_buffer Specifies an array in the application process in which the information to be writ-
ten to the file is stored before the call.
write_count Specifies the number of bytes to be written.
read_count Specifies the number of bytes to be read.
tag (Optional) 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.
Output
read_buffer Specifies an array in the application process which contains the information read
from the file.
count_read (Optional) For waited I/O only. This parameter returns a count of the number of
bytes returned from the file into read_buffer.
DESCRIPTION
The PUT_FILE_WRITEREAD_() function is the thread-aware version of the Guardian
FILE_WRITEREAD_ procedure and FILE_WRITEREAD64_ procedures.
The PUT_FILE_WRITEREAD_() function writes data to a process, which was previously
opened from an array in the application process, then waits for data to be transferred back from
the process. The data buffers for the PUT_FILE_WRITEREAD_() procedure can be either in
the caller’s stack segment or an extended data segment for the write portion.
If the file is opened for nowait I/O, you must not modify the write_buffer or read_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
buffers used in the call to the PUT_FILE_WRITEREAD_() function are not reused before the
5212 Hewlett-Packard Company 527186-023