-#define MPOL_DEFAULT 0
-#define MPOL_PREFERRED 1
-#define MPOL_BIND 2
-#define MPOL_INTERLEAVE 3
-
-#define MPOL_F_NODE (1<<0)
-#define MPOL_F_ADDR (1<<1)
-
-#define MPOL_MF_STRICT (1<<0)
-#define MPOL_MF_MOVE (1<<1)
-#define MPOL_MF_MOVE_ALL (1<<2)
-
-#include "xlat/policies.h"
-#include "xlat/mbindflags.h"
-#include "xlat/mempolicyflags.h"
-#include "xlat/move_pages_flags.h"
-
-static void
-get_nodes(struct tcb *tcp, unsigned long ptr, unsigned long maxnodes, int err)
-{
- unsigned long nlongs, size, end;
-
- nlongs = (maxnodes + 8 * sizeof(long) - 1) / (8 * sizeof(long));
- size = nlongs * sizeof(long);
- end = ptr + size;
- if (nlongs == 0 || ((err || verbose(tcp)) && (size * 8 == maxnodes)
- && (end > ptr))) {
- unsigned long n, cur, abbrev_end;
- int failed = 0;
-
- if (abbrev(tcp)) {
- abbrev_end = ptr + max_strlen * sizeof(long);
- if (abbrev_end < ptr)
- abbrev_end = end;
- } else {
- abbrev_end = end;
- }
- tprints(", {");
- for (cur = ptr; cur < end; cur += sizeof(long)) {
- if (cur > ptr)
- tprints(", ");
- if (cur >= abbrev_end) {
- tprints("...");
- break;
- }
- if (umoven(tcp, cur, sizeof(n), &n) < 0) {
- tprints("?");
- failed = 1;
- break;
- }
- tprintf("%#0*lx", (int) sizeof(long) * 2 + 2, n);
- }
- tprints("}");
- if (failed)
- tprintf(" %#lx", ptr);
- } else
- tprintf(", %#lx", ptr);
- tprintf(", %lu", maxnodes);