1 #define _GNU_SOURCE 2 #include <sys/mman.h> 3 #include <unsupported_api.h> 4 #include "syscall.h" 5 posix_madvise(void * addr,size_t len,int advice)6int posix_madvise(void *addr, size_t len, int advice) 7 { 8 unsupported_api(__FUNCTION__); 9 if (advice == MADV_DONTNEED) return 0; 10 return -__syscall(SYS_madvise, addr, len, advice); 11 } 12