Guardian Procedure Calls Reference Manual
WRITEREAD[X] Procedures
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Condition Code Settings
Considerations
Considerations for WRITEREADX Only
Errors for WRITEREADX Only
Example
Related Programming Manuals
Summary
The WRITEREAD[X] procedures write data to a file from an array in the application process, then
wait 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.
The WRITEREAD procedure is intended for use with 16-bit addresses, while the WRITEREADX
procedure is intended for use with 32-bit extended addresses. The data buffer for WRITEREADX
can be either in the caller's stack segment or any extended data segment.
If the file is opened for nowait I/O, you must not modify the buffer before the I/O completes with
a call to AWAITIOX. This condition also applies to other processes that may be sharing the segment.
The application must ensure that the buffer used in the call to WRITEREADX is not reused before
the I/O completes with a call to AWAITIOX.
Terminals
A special hardware feature is incorporated in the asynchronous multiplexer controller, which
ensures that the system is ready to read from the terminal as soon as the write is completed.
Interprocess Communication
The WRITEREAD[X] procedure is used to originate a message to another process which was
previously opened, then wait for a reply from that process.
NOTE: The WRITEREAD[X] procedures perform the same operation as the FILE_WRITEREAD[64]_
Procedures (page 531). FILE_WRITEREAD64_ is recommended for new code.
Key differences in FILE_WRITEREAD64_ are:
• The pointer and tag parameters are 64 bits wide.
• The count parameters are 32 bits wide.
• The procedure returns an error code value rather than a condition code, simplifying
error-handling code.
1504 Guardian Procedure Calls (W-Z)