Guardian Procedure Calls Reference Manual

FILE_WRITEREAD[64]_ Procedures
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Returned Value
Considerations
Example
Summary
The FILE_WRITEREAD[64]_ procedures perform a writeread request to a file. For no-wait files, the
user program is returned to after the request is initiated. For waited files, the completion is waited
for, and then the data is moved into the user buffer. The count read will not be returned back for
no-waited calls. The FILE_WRITEREAD[64]_ procedures are similar to the WRITEREADX procedure
except that they accept two user buffers for the write and read operations respectively. These
procedures support I/O operations on process type files. FILE_WRITEREAD64_ supports I/O
operations on terminals as well. The data buffers for the FILE_WRITEREAD[64]_ procedures can
either be in the caller's stack segment or in an extended data segment.
If the file is opened for nowait I/O, you must not modify the buffer before the FILE_WRITEREAD_
I/O operation completes with a call to AWAITIOX, or the FILE_WRITEREAD64_ I/O operation
completes with a call to FILE_AWAITIO64_ or FILE_COMPLETEL_. This condition also applies to
other processes that may be sharing the segment. The application must ensure that the
read-buffer and write-buffer used in the call to FILE_WRITEREAD[64]_ are not reused
before the I/O operation completes with a call to AWAITIOX, FILE_AWAITIO64_, or
FILE_COMPLETEL_.
FILE_WRITEREAD64_ extends the capabilities of FILE_WRITEREAD_ in several ways:
It permits the write buffer to reside outside of the 32-bit addressable range.
It is callable from both 32-bit and 64-bit processes.
It allows the returned count-read argument to reside outside of the 32-bit addressable
range.
It allows a 64-bit nowait I/O tag to be passed.
FILE_WRITEREAD64_ supports terminal I/O and I/O to $0.
Interprocess Communication
The FILE_WRITEREAD[64]__ procedure is used to originate a message to another process, which
was previously opened, then waits for a reply from that process.
NOTE: The FILE_WRITEREAD_ procedure is supported only on systems running H-series or J-series
RVUs.
The FILE_WRITEREAD64_ procedure is supported on systems running H06.24 and later H-series
RVUs and J06.13 and later J-series RVUs. Its use is recommended for new code.
The FILE_WRITEREAD[64]_ procedures are available only for native processes.
FILE_WRITEREAD[64]_ Procedures 531