Guardian Procedure Calls Reference Manual
I/O operation because this creates the possibility of changing the contents of the write buffer
before the write is completed
• 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.
◦
◦ 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.
◦ If the file is opened for nowait I/O, the extended segment containing the buffer need not
be in use at the time of the call to FILE_AWAITIO64_ or FILE_COMPLETEL_ .
◦ 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
(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.
WARNING! On NSAA systems, the FILE_READ64_, FILE_WRITE64_ and FILE_WRITEREAD64_
procedures use the process file segment (PFS) of the caller to store the data being read or written.
The maximum PFS size is 32 MB. This limits the number of concurrent no-wait operations with large
read-count or write-count values. Perform the following steps to work around this limit:
1. Define the read and write buffers with sizes in multiples of 16KB.
2. Call the USERIOBUFFER_ALLOW_ procedure before making any calls to these procedures.
3. Allocate extended data segments using the SEGMENT_ALLOCATE64_ procedure.
4. Define a pool on the segment using the POOL64_DEFINE_ procedure.
5. Allocate buffers from the pool boundaries. See the FILE_AWAITIO64_ procedure for an
example.
Disk File Considerations
• Large data transfers for unstructured files using default mode
For the write procedures, default mode allows I/O sizes for unstructured files to be as large
as 56 KB (57,344), excepting writes to audited files, if the unstructured buffer size (or block
FILE_WRITE64_ Procedure 527