Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

rf_getalloccap(3P4)

rf_getcachecap(3P4)

rf_getbiocap(3P4)

rf_getdiocap(3P4)

rf_getaiocap(3P4)

NAME

rf_getaiocap − get atomic I/O capabilities of realtime files and file systems

SYNOPSIS

#include <rtfiles.h>

int rf_getaiocap(fildes, capbufp)
int fildes;
struct rf_capaiobuf ∗capbufp;

DESCRIPTION

The rf_getaiocap function allows the calling process to obtain the atomic I/O capabilities of the file specified by fildes.  An atomic I/O operation is a transfer of data which succeeds or fails as a unit, and which is not divisible by another transfer to the same addresses to the storage medium involved. 

If fildes specifies a file which is not a directory, then the capabilities refer to the file itself.  If fildes specifies a directory, then the capabilities refer to files created within that directory. 

The capabilities of the file or file system will be stored in the rf_capaiobuf structure specified by the capbufp argument upon successful completion. 

The rf_capaiobuf structure is declared in the <rtfiles.h> header file.  The structure has the following members:

off_tatc_aiomin;
off_tatc_aiomax;
off_tatc_aioincr;
int  atc_aioincrtype;
intatc_aiosoffset;
intatc_aioboundary;

The fields atc_aiomin and atc_aiomax will contain the minimum and maximum atomic transfer sizes supported. 

The field atc_aioincr contains the transfer size increment.  atc_aioincrtype specifies how to interpret the transfer size increment (ATC_MULTIPLY will be set to indicate that transfer size must be integral multiple of atc_aioincr). 

The field atc_aiosoffset indicates the starting seek alignment required for atomic transfer.  If zero, alignment is not required.  atc_aioboundary specifies a seek alignment that cannot be spanned by an atomic transfer.  If zero, any alignment can be spanned. 

RETURN VALUE

Upon successful completion, the function rf_getaiocap returns a value of 0;  otherwise it returns a value of -1 and sets errno to indicate the error. 

ERRORS

Under the following conditions, the function rf_getaiocap fails and sets errno to:

­[EBADF] The fildes argument is not a valid file descriptor. 

­[EINVAL] The rf_getaiocap function in not supported for the specified file or file system. 

SEE ALSO

rf_getalloccap(3P4), rf_getcachecap(3P4), rf_getbiocap(3P4),
rf_getdiocap(3P4).

NOTES

On CX systems, different values will be returned for direct I/O vs. buffered I/O. 

WARNING

rf_getaiocap is based on IEEE Draft Standard P1003.4/D12.  This is an unapproved draft, subject to change.  Use of information contained in this unapproved draft is at your own risk.  This interface will change to reflect any changes made by future drafts of POSIX 1003.4. 

CX/UX Programmer’s Reference Manual

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026