about summary refs log tree commit diff
path: root/src/mman/posix_madvise.c
blob: b76f1a75a3f696e45984f8c8095bf0efdb42a0cf (plain) (blame)
1
2
3
4
5
6
7
8
#define _GNU_SOURCE
#include <sys/mman.h>

int posix_madvise(void *addr, size_t len, int advice)
{
	if (advice == MADV_DONTNEED) return 0;
	return -__syscall(SYS_madvise, addr, len, advice);
}