EAF_OpenPersist
Description:
Open a persistent file
Prototype:
integer EAF_OpenPersist(fname, type)
character *(*) fname
integer type
Parameters:
fname
type
Returns:
EAF_OpenScratch
Description:
Open a scratch file which is automatically deleted upon close
Prototype:
integer EAF_OpenScratch(fname, type)
character *(*) fname
integer type
Parameters:
fname
type
Returns:
File handle, or CHEMIO_FAIL upon error
EAF_Write
Description:
Synchronously write to the file specified by the file handle
Prototype:
integer EAF_Write(fh, offset, buf, bytes)
integer fh
integer offset
_______ buf
integer bytes
Parameters:
fh
buf
bytes
Returns:
Number of bytes written, or CHEMIO_FAIL if an error occured
EAF_AWrite
Description:
Asynchronously write to the file specified by the file handle, and return a handle to the asynchronous operation.
If there are more than MAX_AIO_REQ asynchronous requests (reading and/or writing) pending, the operation is handled in a synchronous fashion and returns a CHEMIO_DONE handle.
On architectures where asynchronous I/O operations are not supported, all requests are handled synchronously, returning a CHEMIO_DONE handle.
Prototype:
integer EAF_AWrite(fh, offset, buf, bytes, req_id)
integer fh
integer offset
_______ buf
integer bytes
integer req_id
Parameters:
fh
offset
buf
bytes
req_id
Returns:
EAF_Read
Description:
Synchronously read from the file specified by the file handle
Prototype:
integer EAF_Read(fh, offset, buf, bytes)
integer fh
integer offset
_______ buf
integer bytes
integer req_id
Parameters:
fh
offset
buf
bytes
Returns:
EAF_ARead
Description:
Asynchronously read from the file specified by the file handle, and return a handle to the asynchronous operation.
If there are more than MAX_AIO_REQ asynchronous requests (reading and/or writing) pending, the operation is handled in a synchronous fashion and returns a CHEMIO_DONE handle.
On architectures where asynchronous I/O operations are not supported, all requests are handled synchronously, returning a CHEMIO_DONE handle.
Prototype:
integer EAF_ARead(fh, offset, buf,bytes, req_id)
integer fh
integer offset
_______ buf
integer bytes
integer req_id
Parameters:
fh
offset
buf
bytes
req_id
Returns:
EAF_Probe
Description:
Determine if an asynchronous request has completed or is pending.
Prototype:
integer EAF_Probe(id, status)
integer id
integer status
Parameters:
id
status Pending or completed status argument
Returns:
CHEMIO_OK if probe succeeded, else returns CHEMIO_FAIL.
status returns CHEMIO_PENDING if the asyncronous operation is not complete, or CHEMIO_DONE if finished.
If the asynchronous request is complete, id is invalidated with CHEMIO_DONE.
EAF_Wait
Description:
Wait for the completion of the asynchronous request, id
Prototype:
integer EAF_Wait(id)
integer id
Parameters:
id
Returns:
CHEMIO_OK if EAF is able to wait for completion, else returns CHEMIO_FAIL.
id is invalidated with CHEMIO_DONE.
EAF_Close
Description:
Close a file
Prototype:
integer EAF_Close(fh)
integer fh
Parameters:
fh
Returns:
CHEMIO_OK if the file was closed, else returns CHEMIO_FAIL.