Open System Services System Calls Reference Manual (G06.28+, H06.05+)
System Functions (s and S) SPT_WRITEREADX(2)
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 seg-
ment or any extended data segment.
Terminals A special hardware feature is incorporated in the asynchronous
multiplexer controller 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 parameter 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 Guar-
dian 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 initia-
tion and completion of a nowait SPT_WRITEREADX( ) opera-
tion. 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 segment must be in use at the time of the call. Flat
segments allocated by a process are always accessible to the
process.
527186-007 Hewlett-Packard Company 7−349