Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

System Functions (n - p) PUT_FILE_WRITEREAD_(2)
I/O completes with a call to AWAITIOX.
For programming information about the FILE_WRITEREAD_ and FILE_WRITEREAD64_ pro-
cedures, see the Enscribe Programmers Guide and the Guardian Programmers Guide.
You can use this function with 32-bit applications or 64-bit applications on systems running
H06.24 or later H-series RVUs or J06.13 or later J-series RVUs.
To use this function in a 32-bit application, you must perform all of the following tasks:
Include the pthread.h header file in the application.
Compile the application using the _PUT_MODEL_ feature test macro or equivalent
compiler command option.
Link the application to the zputdll library.
To use this function in a 64-bit application, you must perform all of the following tasks:
Include the pthread.h header file in the application.
Compile the application using the _PUT_MODEL_ feature test macro or equivalent
compiler command option.
Compile the application using the -Wlp64 compiler command option.
Link the application to the yputdll library (/G/system/zdllnnn/yputdll).
Considerations
Buffer use
PUT_FILE_WRITEREAD_() is intended for use with 32-bit extended
addresses and 64-bit extended addresses. The data buffers for
PUT_FILE_WRITEREAD_() can be either in the caller’s stack segment or
any extended data segment.
Interprocess communication
The PUT_FILE_WRITEREAD_() function is used to originate a message to
another process that was previously opened, then waits for a reply from that pro-
cess.
Waited I/O read operation
If a waited I/O PUT_FILE_WRITEREAD_() call is executed, the count_read
parameter indicates the number of bytes actually read.
Nowait I/O read operation
If a nowait I/O PUT_FILE_WRITEREAD_() call is executed, count_read has
no meaning and can be omitted. The count of the number of bytes read is
obtained when the I/O operation completes through the count-transfe rred param-
eter of the Guardian AWAITIOX procedure or FILE_COMPLETE_ procedure.
The PUT_FILE_WRITEREAD_() function must complete with a correspond-
ing call to the Guardian AWAITIOX procedure or FILE_COMPLETE procedure
when used with a file that is opened for nowait I/O.
Do not change the contents of the data buffers between the initiation and com-
pletion of a nowait PUT_FILE_WRITEREAD_() operation. A retry can copy
the data again from the user buffer and cause the wrong data to be written.
Avoid sharing a buffer between a PUT_FILE_WRITEREAD_() and another
I/O operation because the contents of the data buffer might change before the
write is completed.
527186-023 Hewlett-Packard Company 5213