|
24 #ifndef HWLOC_LINUX_LIBNUMA_H
25 #define HWLOC_LINUX_LIBNUMA_H
53 unsigned long *mask, unsigned long *maxnode)
56 unsigned long outmaxnode = -1;
59 *maxnode = (*maxnode + 8* sizeof(*mask) - 1) & ~(8* sizeof(*mask) - 1);
60 memset(mask, 0, *maxnode/8);
67 mask[node-> os_index/ sizeof(*mask)/8] |= 1UL << (node-> os_index % ( sizeof(*mask)*8));
68 if (outmaxnode == ( unsigned long) -1 || outmaxnode < node->os_index)
80 *maxnode = outmaxnode+1;
96 unsigned long *mask, unsigned long *maxnode)
99 unsigned long outmaxnode = -1;
102 *maxnode = (*maxnode + 8* sizeof(*mask) - 1) & ~(8* sizeof(*mask) - 1);
103 memset(mask, 0, *maxnode/8);
112 mask[node-> os_index/ sizeof(*mask)/8] |= 1UL << (node-> os_index % ( sizeof(*mask)*8));
113 if (outmaxnode == ( unsigned long) -1 || outmaxnode < node->os_index)
125 *maxnode = outmaxnode+1;
140 const unsigned long *mask, unsigned long maxnode)
149 && (mask[node-> os_index/ sizeof(*mask)/8] & (1UL << (node-> os_index % ( sizeof(*mask)*8)))))
173 const unsigned long *mask, unsigned long maxnode)
182 && (mask[node-> os_index/ sizeof(*mask)/8] & (1UL << (node-> os_index % ( sizeof(*mask)*8)))))
213 static inline struct bitmask *
215 static inline struct bitmask *
219 struct bitmask *bitmask = numa_allocate_cpumask();
227 numa_bitmask_setbit(bitmask, node-> os_index);
231 numa_bitmask_setbit(bitmask, 0);
246 static inline struct bitmask *
248 static inline struct bitmask *
252 struct bitmask *bitmask = numa_allocate_cpumask();
260 numa_bitmask_setbit(bitmask, node-> os_index);
264 numa_bitmask_setbit(bitmask, 0);
277 const struct bitmask *bitmask)
285 if (numa_bitmask_isbitset(bitmask, node-> os_index))
289 if (numa_bitmask_isbitset(bitmask, 0))
305 const struct bitmask *bitmask)
313 if (numa_bitmask_isbitset(bitmask, node-> os_index))
317 if (numa_bitmask_isbitset(bitmask, 0))
330 #ifdef NUMA_VERSION1_COMPATIBILITY
349 nodemask_t *nodemask)
353 nodemask_zero(nodemask);
358 nodemask_set(nodemask, node-> os_index);
362 nodemask_set(nodemask, 0);
375 nodemask_t *nodemask)
379 nodemask_zero(nodemask);
385 nodemask_set(nodemask, node-> os_index);
389 nodemask_set(nodemask, 0);
402 const nodemask_t *nodemask)
410 if (nodemask_isset(nodemask, node-> os_index))
414 if (nodemask_isset(nodemask, 0))
430 const nodemask_t *nodemask)
438 if (nodemask_isset(nodemask, node-> os_index))
442 if (nodemask_isset(nodemask, 0))
|
|
|