remove [64] cleanup TODO
[trinity.git] / syscalls / madvise.c
blob9e0e5b371bb9d071026111145e3e629438f8acd4
1 /*
2 * SYSCALL_DEFINE3(madvise, unsigned long, start, size_t, len_in, int, behavior)
3 */
4 #include <stdlib.h>
5 #include <sys/mman.h>
6 #include "maps.h"
7 #include "sanitise.h"
8 #include "shm.h"
9 #include "compat.h"
11 static void sanitise_madvise(int childno)
13 (void) common_set_mmap_ptr_len(childno);
16 struct syscallentry syscall_madvise = {
17 .name = "madvise",
18 .num_args = 3,
19 .arg1name = "start",
20 .arg1type = ARG_MMAP,
21 .arg2name = "len_in",
22 .arg3name = "advice",
23 .arg3type = ARG_OP,
24 .arg3list = {
25 .num = 14,
26 .values = { MADV_NORMAL, MADV_RANDOM, MADV_SEQUENTIAL, MADV_WILLNEED,
27 MADV_DONTNEED, MADV_REMOVE, MADV_DONTFORK, MADV_DOFORK,
28 MADV_MERGEABLE, MADV_UNMERGEABLE, MADV_HUGEPAGE, MADV_NOHUGEPAGE,
29 MADV_DONTDUMP, MADV_DODUMP, },
31 .group = GROUP_VM,
32 .sanitise = sanitise_madvise,