rf_getcachecap(3P4)
NAME
rf_getcachecap − get buffer cache capabilities of realtime files and file systems
SYNOPSIS
#include <rtfiles.h>
int rf_getcachecap(fildes, capbufp)
int fildes;
struct rf_capcachebuf ∗capbufp;
DESCRIPTION
The rf_getcachecap function allows the calling process to obtain the buffer cache 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_capcachebuf structure specified by the capbufp argument upon successful completion.
The rf_capcachebuf structure is declared in the <rtfiles.h> header file. The structure has the following members:
intatc_cacheflags;
The field atc_cacheflags contains flags that are used to indicate cache capabilities. Possible flags are:
ATC_CACHERANDOM
Data blocks are accessed randomly.
ATC_CACHESEQUENTIAL
Data blocks are accessed sequentially.
ATC_CACHENOREUSE
Recently accessed data blocks are not expected to be accessed in the near future.
RETURN VALUE
Upon successful completion, the function rf_getcachecap 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_getcachecap fails and sets errno to:
[EBADF] The fildes argument is not a valid file descriptor.
[EINVAL] The rf_getcachecap function in not supported for the specified file or file system.
SEE ALSO
rf_getalloccap(3P4), rf_getbiocap(3P4), rf_getaiocap(3P4),
rf_getdiocap(3P4).
NOTES
The ATC_CACHENOREUSE mode is not supported on CX systems.
A file in direct I/O mode does not use the cache. Upon return, none of the cache flags will be set.
WARNING
rf_getcachecap 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