posix_fadvise.c 496 B

12345678910111213141516
  1. #include <fcntl.h>
  2. #include "syscall.h"
  3. int posix_fadvise(int fd, off_t base, off_t len, int advice)
  4. {
  5. #if defined(SYSCALL_FADVISE_6_ARG)
  6. /* Some archs, at least arm and powerpc, have the syscall
  7. * arguments reordered to avoid needing 7 argument registers
  8. * due to 64-bit argument alignment. */
  9. return -__syscall(SYS_fadvise, fd, advice,
  10. __SYSCALL_LL_E(base), __SYSCALL_LL_E(len));
  11. #else
  12. return -__syscall(SYS_fadvise, fd, __SYSCALL_LL_O(base),
  13. __SYSCALL_LL_E(len), advice);
  14. #endif
  15. }