Lines Matching defs:nodemask
49 static void get_nodemask_allnodes(nodemask_t * nodemask, unsigned long max_node)
56 memset(nodemask, 0, nodemask_size);
60 nodemask_set(nodemask, i);
64 static int filter_nodemask_mem(nodemask_t * nodemask, unsigned long max_node)
68 memset(nodemask, 0, nodemask_size);
80 if (syscall(__NR_get_mempolicy, NULL, nodemask->n,
93 if (!nodemask_isset(nodemask, i))
96 nodemask_clr(nodemask, i);
115 static void filter_nodemask_cpu(nodemask_t * nodemask, unsigned long max_node)
124 if (!nodemask_isset(nodemask, i))
131 nodemask_clr(nodemask, i);
157 nodemask_t *nodemask = NULL;
172 nodemask = malloc(nodemask_size);
177 if (nodemask == NULL || (nodes && (*nodes == NULL))) {
183 get_nodemask_allnodes(nodemask, max_node);
185 ret = filter_nodemask_mem(nodemask, max_node);
190 filter_nodemask_cpu(nodemask, max_node);
193 if (nodemask_isset(nodemask, i)) {
200 free(nodemask);