diff options
Diffstat (limited to 'include/linux/nodemask.h')
-rw-r--r-- | include/linux/nodemask.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h index dba35e413371..7afc36334d52 100644 --- a/include/linux/nodemask.h +++ b/include/linux/nodemask.h | |||
@@ -66,6 +66,8 @@ | |||
66 | * int num_online_nodes() Number of online Nodes | 66 | * int num_online_nodes() Number of online Nodes |
67 | * int num_possible_nodes() Number of all possible Nodes | 67 | * int num_possible_nodes() Number of all possible Nodes |
68 | * | 68 | * |
69 | * int node_random(mask) Random node with set bit in mask | ||
70 | * | ||
69 | * int node_online(node) Is some node online? | 71 | * int node_online(node) Is some node online? |
70 | * int node_possible(node) Is some node possible? | 72 | * int node_possible(node) Is some node possible? |
71 | * | 73 | * |
@@ -430,6 +432,7 @@ static inline void node_set_offline(int nid) | |||
430 | node_clear_state(nid, N_ONLINE); | 432 | node_clear_state(nid, N_ONLINE); |
431 | nr_online_nodes = num_node_state(N_ONLINE); | 433 | nr_online_nodes = num_node_state(N_ONLINE); |
432 | } | 434 | } |
435 | |||
433 | #else | 436 | #else |
434 | 437 | ||
435 | static inline int node_state(int node, enum node_states state) | 438 | static inline int node_state(int node, enum node_states state) |
@@ -460,6 +463,16 @@ static inline int num_node_state(enum node_states state) | |||
460 | 463 | ||
461 | #define node_set_online(node) node_set_state((node), N_ONLINE) | 464 | #define node_set_online(node) node_set_state((node), N_ONLINE) |
462 | #define node_set_offline(node) node_clear_state((node), N_ONLINE) | 465 | #define node_set_offline(node) node_clear_state((node), N_ONLINE) |
466 | |||
467 | #endif | ||
468 | |||
469 | #if defined(CONFIG_NUMA) && (MAX_NUMNODES > 1) | ||
470 | extern int node_random(const nodemask_t *maskp); | ||
471 | #else | ||
472 | static inline int node_random(const nodemask_t *mask) | ||
473 | { | ||
474 | return 0; | ||
475 | } | ||
463 | #endif | 476 | #endif |
464 | 477 | ||
465 | #define node_online_map node_states[N_ONLINE] | 478 | #define node_online_map node_states[N_ONLINE] |