Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)
SPT_WRITEREADX(2) OSS System Calls Reference Manual
Considerations
Buffer use SPT_WRITEREADX() is intended for use with 32-bit extended addresses.
Therefore, the data buffer for SPT_WRITEREADX() can be either in the
caller’s stack segment or any extended data segment.
Terminals A special hardware feature is incorporated in the asynchronous multiplexer con-
troller that ensures the system is ready to read from the terminal as soon as the
write is completed.
Interprocess communication
The SPT_WRITEREADX() function is used to originate a message to another
process that was previously opened, then waits for a reply from that process.
Waited I/O read operation
If a waited I/O SPT_WRITEREADX( ) call is executed, the count_read param-
eter indicates the number of bytes actually read.
Nowait I/O read operation
If a nowait I/O SPT_WRITEREADX() call is executed, count_read has no
meaning and can be omitted. The count of the number of bytes read is obtained
when the I/O operation completes through the count-transferred parameter of the
Guardian AWAITIOX procedure.
The SPT_WRITEREADX() function must complete with a corresponding call
to the Guardian AWAITIOX procedure when used with a file that is opened for
nowait I/O.
Do not change the contents of the data buffer between the initiation and comple-
tion of a nowait SPT_WRITEREADX() operation. A retry can copy the data
again from the user buffer and cause the wrong data to be written. Avoid sharing
a buffer between a SPT_WRITEREADX() and another I/O operation because
the contents of the data buffer might change before the write is completed.
Carriage return/line feed sequence after the write
No carriage return and line feed sequence is sent to the terminal after the write
part of the operation.
Location of buffer and count_read
The buffer and count transferred can be in the user stack or in an extended data
segment. The buffer and count_read cannot be in the user code space.
If the buffer and count_read are in a selectable extended data segment, the seg-
ment must be in use at the time of the call. Flat segments allocated by a process
are always accessible to the process.
Use on files opened for nowait I/O
• If the buffer is in an extended data segment, you cannot deallocate or
reduce the size of the extended data segment before the I/O completes
with a call to the Guardian AWAITIOX procedure or is canceled by a
call to the SPT_CANCEL() function or the Guardian CANCELREQ
procedure.
• You must not modify the buffer before the I/O completes with a call to
the Guardian AWAITIOX procedure. This restriction also applies to
other processes that might share the segment. It is the application’s
responsibility to ensure this.
7−454 Hewlett-Packard Company 527186-023