![]() |
![]() |
![]() |
![]() |
Provide advisory information about the expected use of a file
#include <fcntl.h> int posix_fadvise( int fd, off_t offset, size_t len, int advice ); int posix_fadvise64( int fd, off64_t offset, size_t len, int advice );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The posix_fadvise() and posix_fadvise64() functions advise the filesystem how the application expects to use the data in the file associated with the open file descriptor, fd, starting at offset and continuing for len bytes. The posix_fadvise64() is a large-file version of posix_fadvise().
The specified range need not currently exist in the file. If len is zero, all data following offset is specified. The filesystem may use this information to optimize handling of the specified data. The posix_fadvise() function has no effect on the semantics of other operations on the specified data, although it may affect the performance of other operations.
posix_fadvise() is POSIX 1003.1 ADV; posix_fadvise64() is Large-file support
Safety: | |
---|---|
Cancellation point | Yes |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
![]() |
![]() |
![]() |
![]() |