POSIX_FADVISE(2) | System Calls Manual | POSIX_FADVISE(2) |
posix_fadvise
—
give advice about use of file data
Standard C Library (libc, -lc)
#include
<fcntl.h>
int
posix_fadvise
(int
fd, off_t offset,
off_t len,
int advice);
The
posix_fadvise
()
system call allows a process to describe to the system its data access
behavior for an open file descriptor fd. The advice
covers the data starting at offset offset and
continuing for len bytes. If len
is zero, all data from offset to the end of the file
is covered.
The behavior is specified by the advice parameter and may be one of:
POSIX_FADV_NORMAL
POSIX_FADV_RANDOM
POSIX_FADV_SEQUENTIAL
POSIX_FADV_WILLNEED
POSIX_FADV_DONTNEED
POSIX_FADV_NOREUSE
If successful, posix_fadvise
() returns
zero. It returns an error on failure, without setting
errno.
Possible failure conditions:
EBADF
]EINVAL
]EINVAL
]ENODEV
]ESPIPE
]The posix_fadvise
() interface conforms to
IEEE Std 1003.1-2001 (“POSIX.1”).
The posix_fadvise
() system call first
appeared in FreeBSD 9.1.
October 3, 2015 | Debian |