Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)
System Functions (n - p) PUT_READX(2)
Read call when alternate locking mode is in effect
If the alternate locking mode is in effect when PUT_READX() is called, and the
file or record is locked through a Guardian file number other than that supplied in
the call, the call is rejected with Guardian file-system error 73 (file is
locked).
Locking mode for read
The locking mode is specified by PUT_SETMODE() function 4. If you
encounter Guardian file-system error 73 (file is locked), you do not need to
call PUT_SETMODE() for every call to PUT_READX( ).
PUT_SETMODE()) stays in effect indefinitely (for example, until another
PUT_SETMODE() call is performed or the file is closed), and no additional
overhead is involved.
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 be sharing the segment. It is the application’s
responsibility to ensure this.
• If the I/O has been initiated with PUT_READX(), the I/O must be com-
pleted 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 cancel nowait I/O initiated with PUT_READX() with a call to
PUT_CANCEL() or CANCELREQ. The I/O is canceled if the file is
closed before the I/O completes or if the Guardian AWAITIOX pro-
cedure is called with a positive time limit and specific file number and
the request times out.
Use of buffers A file opened by PUT_FILE_OPEN_() uses direct I/O transfers by default; you
can use PUT_SETMODE(72) to force the system to use an intermediate buffer
in the process file segment (PFS) for I/O transfers.
Bounds checking
If the extended address of buffer is odd, bounds checking rounds the address to
the next lower word boundary and checks an extra byte as well. The odd address
is used for the transfer.
527186-023 Hewlett-Packard Company 5−245