Guardian Procedure Calls Reference Manual

4. Define memory pools for the allocated extended data segments.
5. Use the POOL_GETSPACE_PAGE_ procedure to obtain a block of memory, which will
be used as the read or write buffer.
6. When the no-wait I/O operation is complete, use the POOL_PUTSPACE_ procedure to
return the memory to the pools.
On non-NSAA systems, reads and writes larger than 4KB on key-sequenced files may be
performed directly from or into the application’s buffer.
See also the READ[X] procedure Considerations (page 1194).
OSS Considerations
This procedure operates only on Guardian objects. If an OSS file is specified, error 2 is returned.
Considerations for READLOCKX Only
The buffer and count transferred may be in the user stack or in an extended data segment.
The buffer and count transferred cannot be in the user code space.
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 cannot
deallocate or reduce the size of the extended data segment before the I/O completes with a
call to AWAITIOX or is canceled by a call to CANCEL or CANCELREQ.
If the file is opened for nowait I/O, you must not modify the buffer before the I/O completes
with a call to AWAITIOX. This also applies to other processes that may be sharing the segment.
It is the application's responsibility to ensure this.
If the file is opened for nowait I/O, and the I/O has been initiated with these routines, the
I/O must be completed with a call to AWAITIOX (not AWAITIO).
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 AWAITIOX.
Nowait I/O initiated with these routines may be canceled with a call to CANCEL or
CANCELREQ. The I/O is canceled if the file is closed before the I/O completes or AWAITIOX
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 (PFS)
for I/O transfers. A file opened by OPEN uses a PFS buffer for I/O transfers, except for large
transfers to DP2 disks.
If the extended address of the 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.
Errors for READLOCKX Only
In addition to the errors currently returned from READLOCK, error 22 is returned from READLOCKX
when:
The address of a parameter is extended, but either the extended data segment is invalid or
the address is for a selectable segment that is not in use at the time of the call.
The address of a parameter is extended, but it is an absolute address and the caller is not
privileged.
READLOCK[X] Procedures 1211