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

System Functions (n - p) PUT_WRITEREADX(2)
nowait I/O.
Do not change the contents of the data buffer between the initiation and comple-
tion of a nowait PUT_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 PUT_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 c ount_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 buff er 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 PUT_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.
If you initiated the I/O with PUT_WRITEREADX(), the I/O must be
completed with a call to the Guardian AWAITIOX procedure.
A selectable extended data segment containing the buffer need not be in
use at the time of the call to AWAITIOX.
You can call PUT_CANCEL() or CANCELREQ to cancel nowait I/O
initiated with PUT_WRITEREADX(). The I/O is canceled if the file is
closed before the I/O completes or if you call the Guardian AWAITIOX
procedure with a positive time limit and specific file number and the
request times out.
Bounds checking
If the extended address of buffer is odd, bounds checking rounds the address to
the next lower word boundary and also checks an extra byte. The odd address is
used for the transfer.
RETURN VALUES
The PUT_WRITEREADX() function returns 0 (zero) upon successful completion. Otherwise,
this function returns a nonzero Guardian file-system error number that indicates the outcome of
the operation.
For information about Guardian file-system error numbers, see the Guardian Procedure Errors
and Messages Manual.
527186-023 Hewlett-Packard Company 5299