move_pages: just use calloc
[trinity.git] / syscalls / get_mempolicy.c
bloba46a629addb9174197b9decb5352fbbb0e30cf8c
1 /*
2 * SYSCALL_DEFINE5(get_mempolicy, int __user *, policy,
3 unsigned long __user *, nmask, unsigned long, maxnode,
4 unsigned long, addr, unsigned long, flags)
5 */
7 #define MPOL_F_NODE (1<<0) /* return next IL mode instead of node mask */
8 #define MPOL_F_ADDR (1<<1) /* look up vma using address */
9 #define MPOL_F_MEMS_ALLOWED (1<<2) /* return allowed memories */
11 #include "sanitise.h"
13 struct syscallentry syscall_get_mempolicy = {
14 .name = "get_mempolicy",
15 .num_args = 5,
16 .arg1name = "policy",
17 .arg1type = ARG_ADDRESS,
18 .arg2name = "nmask",
19 .arg2type = ARG_ADDRESS,
20 .arg3name = "maxnode",
21 .arg3type = ARG_RANGE,
22 .low3range = 0,
23 .hi3range = 1 << 9, /* 1 << CONFIG_NODES_SHIFT */
24 .arg4name = "addr",
25 .arg4type = ARG_ADDRESS,
26 .arg5name = "flags",
27 .arg5type = ARG_LIST,
28 .arg5list = {
29 .num = 3,
30 .values = { MPOL_F_NODE, MPOL_F_ADDR, MPOL_F_MEMS_ALLOWED },
32 .rettype = RET_ZERO_SUCCESS,