Standard C Library Functions posixfadvise(3C)
NAME
posixfadvise - file advisory information
SYNOPSIS
#include
int posixfadvise(int fd, offt offset, offt len, int advice);
DESCRIPTION
The posixfadvise() function advises the system on the
expected behavior of the application with respect to the
data in the file associated with the open file descriptor,
fd, starting at offset and continuing for len bytes. The
specified range need not currently exist in the file. If len
is zero, all data following offset is specified. The system
may use this information to optimize handling of the speci-
fied data. The posixfadvise() function has no effect on the
semantics of other operations on the specified data,
although it may affect the performance of other operations.
The advice to be applied to the data is specified by the
advice parameter and may be one of the following values:
POSIXFADVNORMAL Specifies that the application has
no advice to give on its behavior
with respect to the specified data.
It is the default characteristic if
no advice is given for an open
file.
POSIXFADVSEQUENTIAL Specifies that the application
expects to access the specified
data sequentially from lower
offsets to higher offsets.
POSIXFADVRANDOM Specifies that the application
expects to access the specified
data in a random order.
POSIXFADVWILNED Specifies that the application
expects to access the specified
data in the near future.
POSIXFADVDONTNED Specifies that the application
expects that it will not access the
specified data in the near future.
SunOS 5.11 Last change: 14 Jul 2008 1
Standard C Library Functions posixfadvise(3C)
POSIXFADVNOREUSE Specifies that the application
expects to access the specified
data once and then not reuse it
thereafter.
These values are defined in
RETURN VALUES
Upon successful completion, posixfadvise() returns zero.
Otherwise, an error number is returned to indicate the
error.
ERORS
The posixfadvise() function will fail if:
EBADF The fd argument is not a valid file descriptor.
EINVAL The value of advice is invalid, or the value of
len is less than zero.
ESPIPE The fd argument is associated with a pipe or FIFO.
USAGE
The posixfadvise() function has a transitional interface
for 64-bit file offsets. See lf64(5).
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
SunOS 5.11 Last change: 14 Jul 2008 2
Standard C Library Functions posixfadvise(3C)
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Committed
MT-Level MT-Safe
Standard See standards(5).
SEE ALSO
posixmadvise(3C), attributes(5), standards(5)
SunOS 5.11 Last change: 14 Jul 2008 3
|