aboutsummaryrefslogtreecommitdiff
path: root/src/mman/madvise.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mman/madvise.c')
-rw-r--r--src/mman/madvise.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mman/madvise.c b/src/mman/madvise.c
new file mode 100644
index 0000000..f03647c
--- /dev/null
+++ b/src/mman/madvise.c
@@ -0,0 +1,10 @@
+#include <sys/mman.h>
+#include "syscall.h"
+#include "libc.h"
+
+int __madvise(void *addr, size_t len, int advice)
+{
+ return syscall3(__NR_madvise, (long)addr, len, advice);
+}
+
+weak_alias(__madvise, madvise);