Guardian Procedure Calls Reference Manual

NOTE: A deadlock condition occurs if a call to FILE_READ64_ is made by a process having
multiple opens on the same file and the filenum used to lock the file differs from the filenum
supplied to FILE_READ64_.
Read call when alternate locking mode is in effect
If the alternate locking mode is in effect when FILE_READ64_ is called, and the file or record
is locked through a file number other than that supplied in the call, the call is rejected with
file-system error 73 (file is locked).
Locking mode for read
The locking mode is specified by the FILE_SETMODENOWAIT64_ procedure, function 4. If
you encounter error 73 (file is locked), you do not need to call FILE_SETMODENOWAIT64_
for every FILE_READ64_. FILE_SETMODENOWAIT64_ stays in effect indefinitely (for example,
until another FILE_SETMODENOWAIT64_ is performed or the file is closed), and there is no
additional overhead involved.
Buffer considerations
The buffer and count transferred can be in the user stack or in an extended data segment.
The buffer and count transferred cannot be in the user code space.
The buffer and count transferred address must be relative; they cannot be an absolute
extended address.
If the buffer or count transferred is 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.
The size of the transfer is subject to current restrictions for the type of file.
If the file is opened for nowait I/O, and the buffer is in an extended data segment, you
must not deallocate or reduce the size of the extended data segment before the I/O
finishes with a call to FILE_AWAITIO64_ or FILE_COMPLETEL_ or is canceled by a call
to CANCEL or CANCELREQL.
If the file is opened for nowait I/O, you must not modify the buffer before the I/O finishes
with a call to FILE_AWAITIO64_ or FILE_COMPLETEL_. This also applies to other processes
that might be sharing the segment. It is the application's responsibility to ensure this.
If the file is opened for nowait I/O, a selectable extended data segment containing the
buffer need not be in use at the time of the call to FILE_AWAITIO64_ or FILE_COMPLETEL_.
Nowait I/O initiated with this routine can be canceled with a call to CANCEL or
CANCELREQL. The I/O is canceled if the file is closed before the I/O finishes or
FILE_AWAITIO64_ is called with a positive time limit and specific file number, and the
request times out.
A file opened by FILE_OPEN_ uses direct I/O transfers by default; you can use SETMODE
function 72 to force the system to use an intermediate buffer in the process file segment
478 Guardian Procedure Calls (F)