Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ rf_getdiocap(3P4) — CX/UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

rf_getalloccap(3P4)

rf_getcachecap(3P4)

rf_getbiocap(3P4)

rf_getaiocap(3P4)

rf_getdiocap(3P4)

NAME

rf_getdiocap − get direct I/O capabilities of realtime files and file systems

SYNOPSIS

#include <rtfiles.h>

int rf_getdiocap(fildes, capbufp)
int fildes;
struct rf_capdiobuf ∗capbufp;

DESCRIPTION

The rf_getdiocap function allows the calling process to obtain the direct I/O capabilities of the file specified by fildes. 

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_capdiobuf structure specified by the capbufp argument upon successful completion. 

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

off_tatc_doffset;
off_tatc_dalign;
off_tatc_diomin;
off_tatc_diomax;
off_tatc_dioincr;
int  atc_dioincrtype;
intatc_dioflags;

The field atc_doffset will contain the seek alignment, in bytes, required for direct I/O. 

atc_dalign indicates the memory alignment required for direct I/O. 

The fields atc_diomin and atc_diomax will contain the minimum and maximum transfer sizes for direct I/O. 

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

atc_dioflags contains flags associated with direct I/O.  Possible flags are:

ATC_DIOCAPABLE
Direct I/O may be performed on the file.

ATC_DIOREQUIRED
Direct I/O shall be performed on the file.  (This will only be set if direct I/O is already enabled for this file).

RETURN VALUE

Upon successful completion, the function rf_getdiocap 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_getdiocap fails and sets errno to:

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

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

SEE ALSO

rf_getalloccap(3P4), rf_getcachecap(3P4), rf_getbiocap(3P4),
rf_getaiocap(3P4).
CX/UX Programmer’s Guide

NOTES

Recommended values for the memory buffer alignment and the transfer size are discussed in CX/UX Programmer’s Guide. 

WARNING

rf_getdiocap 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