Guardian Procedure Calls Reference Manual

Returned Value
INT
A file-system error code that indicates the outcome of the call.
22
The address of a parameter refers to the selectable segment area but no selectable segment is in use at
the time of the call.
The address of a parameter references a privileged segment and the caller is not privileged.
The file system cannot use the user's segment when needed.
The write-buffer and read-buffer memory are overlapping each other partially (however, if both the
buffers point to the same address, it is acceptable).
590
Considerations
EpTAL callers must set toggle
EpTAL callers must set the toggle _64BIT_CALLS before sourcing the FILE_WRITEREAD64_
procedure section from EXTDECS.
Waited I/O READ
If a waited I/O FILE_WRITEREAD[64]_ is executed, the count-read parameter indicates
the number of bytes actually read.
Nowait I/O READ
FILE_WRITEREAD_ must complete with a call to the AWAITIOX procedure or the
FILE_COMPLETE_ procedure when used with a file that is opened nowait; FILE_WRITEREAD64_
must complete with a call to the FILE_AWAITIO64_ procedure or the FILE_COMPLETEL_
procedure when used with a file that is opened nowait.
If a nowait I/O FILE_WRITEREAD[64]_ is executed, the count-read parameter has no
meaning and can be omitted. The count of the number of bytes read is obtained when the
FILE_WRITEREAD_ I/O operation completes through the count-transferred parameter
of the AWAITIOX or FILE_COMPLETE_ procedure. The count of the number of bytes read is
obtained when the FILE_WRITEREAD64_ I/O operation completes through the
count-transferred parameter of the FILE_AWAITIO64_ or the FILE_COMPLETEL_
procedure.
You must not change the contents of the data buffers between the initiation and completion
of a nowait FILE_WRITEREAD[64]_ operation. This is because a retry can copy the data again
from the write-buffer and cause the wrong data to be written.
You must avoid sharing a buffer between a FILE_WRITEREAD[64]_ and another I/O operation
because this creates the possibility of changing the contents of the data buffer before the write
operation is completed.
Buffer considerations
The write-buffer, read-buffer, and count-transferred may be in the user
stack or in an extended data segment. The buffers and count transferred cannot be in the
user code space.
If the write-buffer, read-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, and buffer is in an extended data segment, you cannot
deallocate or reduce the size of the extended data segment before the FILE_WRITEREAD_
I/O operation completes with a call to the AWAITIOX or FILE_COMPLETE_ procedure
or the call is canceled by a call to CANCEL or CANCELREQ, or the FILE_WRITEREAD64_
534 Guardian Procedure Calls (F)