Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Variables
nodemask.h File Reference
#include <linux/kernel.h>
#include <linux/threads.h>
#include <linux/bitmap.h>
#include <linux/numa.h>

Go to the source code of this file.

Data Structures

struct  nodemask_t
 
struct  nodemask_scratch
 

Macros

#define node_set(node, dst)   __node_set((node), &(dst))
 
#define node_clear(node, dst)   __node_clear((node), &(dst))
 
#define nodes_setall(dst)   __nodes_setall(&(dst), MAX_NUMNODES)
 
#define nodes_clear(dst)   __nodes_clear(&(dst), MAX_NUMNODES)
 
#define node_isset(node, nodemask)   test_bit((node), (nodemask).bits)
 
#define node_test_and_set(node, nodemask)   __node_test_and_set((node), &(nodemask))
 
#define nodes_and(dst, src1, src2)   __nodes_and(&(dst), &(src1), &(src2), MAX_NUMNODES)
 
#define nodes_or(dst, src1, src2)   __nodes_or(&(dst), &(src1), &(src2), MAX_NUMNODES)
 
#define nodes_xor(dst, src1, src2)   __nodes_xor(&(dst), &(src1), &(src2), MAX_NUMNODES)
 
#define nodes_andnot(dst, src1, src2)   __nodes_andnot(&(dst), &(src1), &(src2), MAX_NUMNODES)
 
#define nodes_complement(dst, src)   __nodes_complement(&(dst), &(src), MAX_NUMNODES)
 
#define nodes_equal(src1, src2)   __nodes_equal(&(src1), &(src2), MAX_NUMNODES)
 
#define nodes_intersects(src1, src2)   __nodes_intersects(&(src1), &(src2), MAX_NUMNODES)
 
#define nodes_subset(src1, src2)   __nodes_subset(&(src1), &(src2), MAX_NUMNODES)
 
#define nodes_empty(src)   __nodes_empty(&(src), MAX_NUMNODES)
 
#define nodes_full(nodemask)   __nodes_full(&(nodemask), MAX_NUMNODES)
 
#define nodes_weight(nodemask)   __nodes_weight(&(nodemask), MAX_NUMNODES)
 
#define nodes_shift_right(dst, src, n)   __nodes_shift_right(&(dst), &(src), (n), MAX_NUMNODES)
 
#define nodes_shift_left(dst, src, n)   __nodes_shift_left(&(dst), &(src), (n), MAX_NUMNODES)
 
#define first_node(src)   __first_node(&(src))
 
#define next_node(n, src)   __next_node((n), &(src))
 
#define nodemask_of_node(node)
 
#define first_unset_node(mask)   __first_unset_node(&(mask))
 
#define NODE_MASK_LAST_WORD   BITMAP_LAST_WORD_MASK(MAX_NUMNODES)
 
#define NODE_MASK_ALL
 
#define NODE_MASK_NONE
 
#define nodes_addr(src)   ((src).bits)
 
#define nodemask_scnprintf(buf, len, src)   __nodemask_scnprintf((buf), (len), &(src), MAX_NUMNODES)
 
#define nodemask_parse_user(ubuf, ulen, dst)   __nodemask_parse_user((ubuf), (ulen), &(dst), MAX_NUMNODES)
 
#define nodelist_scnprintf(buf, len, src)   __nodelist_scnprintf((buf), (len), &(src), MAX_NUMNODES)
 
#define nodelist_parse(buf, dst)   __nodelist_parse((buf), &(dst), MAX_NUMNODES)
 
#define node_remap(oldbit, old, new)   __node_remap((oldbit), &(old), &(new), MAX_NUMNODES)
 
#define nodes_remap(dst, src, old, new)   __nodes_remap(&(dst), &(src), &(old), &(new), MAX_NUMNODES)
 
#define nodes_onto(dst, orig, relmap)   __nodes_onto(&(dst), &(orig), &(relmap), MAX_NUMNODES)
 
#define nodes_fold(dst, orig, sz)   __nodes_fold(&(dst), &(orig), sz, MAX_NUMNODES)
 
#define for_each_node_mask(node, mask)
 
#define for_each_node_state(node, __state)   for ( (node) = 0; (node) == 0; (node) = 1)
 
#define first_online_node   0
 
#define next_online_node(nid)   (MAX_NUMNODES)
 
#define nr_node_ids   1
 
#define nr_online_nodes   1
 
#define node_set_online(node)   node_set_state((node), N_ONLINE)
 
#define node_set_offline(node)   node_clear_state((node), N_ONLINE)
 
#define node_online_map   node_states[N_ONLINE]
 
#define node_possible_map   node_states[N_POSSIBLE]
 
#define num_online_nodes()   num_node_state(N_ONLINE)
 
#define num_possible_nodes()   num_node_state(N_POSSIBLE)
 
#define node_online(node)   node_state((node), N_ONLINE)
 
#define node_possible(node)   node_state((node), N_POSSIBLE)
 
#define for_each_node(node)   for_each_node_state(node, N_POSSIBLE)
 
#define for_each_online_node(node)   for_each_node_state(node, N_ONLINE)
 
#define NODEMASK_ALLOC(type, name, gfp_flags)   type _##name, *name = &_##name
 
#define NODEMASK_FREE(m)   do {} while (0)
 
#define NODEMASK_SCRATCH(x)
 
#define NODEMASK_SCRATCH_FREE(x)   NODEMASK_FREE(x)
 

Enumerations

enum  node_states {
  N_POSSIBLE, N_ONLINE, N_NORMAL_MEMORY, N_HIGH_MEMORY = N_NORMAL_MEMORY,
  N_CPU, NR_NODE_STATES
}
 

Variables

nodemask_t _unused_nodemask_arg_
 
nodemask_t node_states [NR_NODE_STATES]
 

Macro Definition Documentation

#define first_node (   src)    __first_node(&(src))

Definition at line 236 of file nodemask.h.

#define first_online_node   0

Definition at line 459 of file nodemask.h.

#define first_unset_node (   mask)    __first_unset_node(&(mask))

Definition at line 265 of file nodemask.h.

#define for_each_node (   node)    for_each_node_state(node, N_POSSIBLE)

Definition at line 486 of file nodemask.h.

#define for_each_node_mask (   node,
  mask 
)
Value:
if (!nodes_empty(mask)) \
for ((node) = 0; (node) < 1; (node)++)

Definition at line 366 of file nodemask.h.

#define for_each_node_state (   node,
  __state 
)    for ( (node) = 0; (node) == 0; (node) = 1)

Definition at line 456 of file nodemask.h.

#define for_each_online_node (   node)    for_each_node_state(node, N_ONLINE)

Definition at line 487 of file nodemask.h.

#define next_node (   n,
  src 
)    __next_node((n), &(src))

Definition at line 242 of file nodemask.h.

#define next_online_node (   nid)    (MAX_NUMNODES)

Definition at line 460 of file nodemask.h.

#define node_clear (   node,
  dst 
)    __node_clear((node), &(dst))

Definition at line 107 of file nodemask.h.

#define node_isset (   node,
  nodemask 
)    test_bit((node), (nodemask).bits)

Definition at line 126 of file nodemask.h.

#define NODE_MASK_ALL
Value:

Definition at line 276 of file nodemask.h.

#define NODE_MASK_LAST_WORD   BITMAP_LAST_WORD_MASK(MAX_NUMNODES)

Definition at line 272 of file nodemask.h.

#define NODE_MASK_NONE
Value:
((nodemask_t) { { \
[0 ... BITS_TO_LONGS(MAX_NUMNODES)-1] = 0UL \
} })

Definition at line 291 of file nodemask.h.

#define node_online (   node)    node_state((node), N_ONLINE)

Definition at line 483 of file nodemask.h.

#define node_online_map   node_states[N_ONLINE]

Definition at line 478 of file nodemask.h.

#define node_possible (   node)    node_state((node), N_POSSIBLE)

Definition at line 484 of file nodemask.h.

#define node_possible_map   node_states[N_POSSIBLE]

Definition at line 479 of file nodemask.h.

#define node_remap (   oldbit,
  old,
  new 
)    __node_remap((oldbit), &(old), &(new), MAX_NUMNODES)

Definition at line 328 of file nodemask.h.

#define node_set (   node,
  dst 
)    __node_set((node), &(dst))

Definition at line 101 of file nodemask.h.

#define node_set_offline (   node)    node_clear_state((node), N_ONLINE)

Definition at line 465 of file nodemask.h.

#define node_set_online (   node)    node_set_state((node), N_ONLINE)

Definition at line 464 of file nodemask.h.

#define node_test_and_set (   node,
  nodemask 
)    __node_test_and_set((node), &(nodemask))

Definition at line 128 of file nodemask.h.

#define nodelist_parse (   buf,
  dst 
)    __nodelist_parse((buf), &(dst), MAX_NUMNODES)

Definition at line 322 of file nodemask.h.

#define nodelist_scnprintf (   buf,
  len,
  src 
)    __nodelist_scnprintf((buf), (len), &(src), MAX_NUMNODES)

Definition at line 314 of file nodemask.h.

#define NODEMASK_ALLOC (   type,
  name,
  gfp_flags 
)    type _##name, *name = &_##name

Definition at line 499 of file nodemask.h.

#define NODEMASK_FREE (   m)    do {} while (0)

Definition at line 500 of file nodemask.h.

#define nodemask_of_node (   node)
Value:
({ \
typeof(_unused_nodemask_arg_) m; \
if (sizeof(m) == sizeof(unsigned long)) { \
m.bits[0] = 1UL << (node); \
} else { \
init_nodemask_of_node(&m, (node)); \
} \
m; \
})

Definition at line 254 of file nodemask.h.

#define nodemask_parse_user (   ubuf,
  ulen,
  dst 
)    __nodemask_parse_user((ubuf), (ulen), &(dst), MAX_NUMNODES)

Definition at line 306 of file nodemask.h.

#define nodemask_scnprintf (   buf,
  len,
  src 
)    __nodemask_scnprintf((buf), (len), &(src), MAX_NUMNODES)

Definition at line 298 of file nodemask.h.

#define NODEMASK_SCRATCH (   x)
Value:

Definition at line 509 of file nodemask.h.

#define NODEMASK_SCRATCH_FREE (   x)    NODEMASK_FREE(x)

Definition at line 512 of file nodemask.h.

#define nodes_addr (   src)    ((src).bits)

Definition at line 296 of file nodemask.h.

#define nodes_and (   dst,
  src1,
  src2 
)    __nodes_and(&(dst), &(src1), &(src2), MAX_NUMNODES)

Definition at line 135 of file nodemask.h.

#define nodes_andnot (   dst,
  src1,
  src2 
)    __nodes_andnot(&(dst), &(src1), &(src2), MAX_NUMNODES)

Definition at line 159 of file nodemask.h.

#define nodes_clear (   dst)    __nodes_clear(&(dst), MAX_NUMNODES)

Definition at line 119 of file nodemask.h.

#define nodes_complement (   dst,
  src 
)    __nodes_complement(&(dst), &(src), MAX_NUMNODES)

Definition at line 167 of file nodemask.h.

#define nodes_empty (   src)    __nodes_empty(&(src), MAX_NUMNODES)

Definition at line 199 of file nodemask.h.

#define nodes_equal (   src1,
  src2 
)    __nodes_equal(&(src1), &(src2), MAX_NUMNODES)

Definition at line 175 of file nodemask.h.

#define nodes_fold (   dst,
  orig,
  sz 
)    __nodes_fold(&(dst), &(orig), sz, MAX_NUMNODES)

Definition at line 352 of file nodemask.h.

#define nodes_full (   nodemask)    __nodes_full(&(nodemask), MAX_NUMNODES)

Definition at line 205 of file nodemask.h.

#define nodes_intersects (   src1,
  src2 
)    __nodes_intersects(&(src1), &(src2), MAX_NUMNODES)

Definition at line 183 of file nodemask.h.

#define nodes_onto (   dst,
  orig,
  relmap 
)    __nodes_onto(&(dst), &(orig), &(relmap), MAX_NUMNODES)

Definition at line 344 of file nodemask.h.

#define nodes_or (   dst,
  src1,
  src2 
)    __nodes_or(&(dst), &(src1), &(src2), MAX_NUMNODES)

Definition at line 143 of file nodemask.h.

#define nodes_remap (   dst,
  src,
  old,
  new 
)    __nodes_remap(&(dst), &(src), &(old), &(new), MAX_NUMNODES)

Definition at line 336 of file nodemask.h.

#define nodes_setall (   dst)    __nodes_setall(&(dst), MAX_NUMNODES)

Definition at line 113 of file nodemask.h.

#define nodes_shift_left (   dst,
  src,
  n 
)    __nodes_shift_left(&(dst), &(src), (n), MAX_NUMNODES)

Definition at line 225 of file nodemask.h.

#define nodes_shift_right (   dst,
  src,
  n 
)    __nodes_shift_right(&(dst), &(src), (n), MAX_NUMNODES)

Definition at line 217 of file nodemask.h.

#define nodes_subset (   src1,
  src2 
)    __nodes_subset(&(src1), &(src2), MAX_NUMNODES)

Definition at line 191 of file nodemask.h.

#define nodes_weight (   nodemask)    __nodes_weight(&(nodemask), MAX_NUMNODES)

Definition at line 211 of file nodemask.h.

#define nodes_xor (   dst,
  src1,
  src2 
)    __nodes_xor(&(dst), &(src1), &(src2), MAX_NUMNODES)

Definition at line 151 of file nodemask.h.

#define nr_node_ids   1

Definition at line 461 of file nodemask.h.

#define nr_online_nodes   1

Definition at line 462 of file nodemask.h.

#define num_online_nodes ( )    num_node_state(N_ONLINE)

Definition at line 481 of file nodemask.h.

#define num_possible_nodes ( )    num_node_state(N_POSSIBLE)

Definition at line 482 of file nodemask.h.

Enumeration Type Documentation

Enumerator:
N_POSSIBLE 
N_ONLINE 
N_NORMAL_MEMORY 
N_HIGH_MEMORY 
N_CPU 
NR_NODE_STATES 

Definition at line 374 of file nodemask.h.

Variable Documentation

nodemask_t _unused_nodemask_arg_