aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cpumask.h
diff options
context:
space:
mode:
authorKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>2006-03-28 04:56:36 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-28 12:16:04 -0500
commit631d6747e1d877a4baa924cb373b8b9511a53e5e (patch)
tree5bb88d5c9716b9d9f398a6a1e8c8be4501671643 /include/linux/cpumask.h
parent68c3431ae22912be580c68d3955ef46515582943 (diff)
[PATCH] for_each_possible_cpu: defines for_each_possible_cpu
for_each_cpu() is a for-loop over cpu_possible_map. for_each_online_cpu is for-loop cpu over cpu_online_map. .....for_each_cpu() is not sufficiently explicit and can lead to mistakes. This patch adds for_each_possible_cpu() in preparation for the removal of for_each_cpu(). Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/cpumask.h')
-rw-r--r--include/linux/cpumask.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index 99e6115d8e52..9cbb781d6f80 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -67,7 +67,7 @@
67 * 67 *
68 * int any_online_cpu(mask) First online cpu in mask 68 * int any_online_cpu(mask) First online cpu in mask
69 * 69 *
70 * for_each_cpu(cpu) for-loop cpu over cpu_possible_map 70 * for_each_possible_cpu(cpu) for-loop cpu over cpu_possible_map
71 * for_each_online_cpu(cpu) for-loop cpu over cpu_online_map 71 * for_each_online_cpu(cpu) for-loop cpu over cpu_online_map
72 * for_each_present_cpu(cpu) for-loop cpu over cpu_present_map 72 * for_each_present_cpu(cpu) for-loop cpu over cpu_present_map
73 * 73 *
@@ -405,7 +405,8 @@ int __any_online_cpu(const cpumask_t *mask);
405#define any_online_cpu(mask) 0 405#define any_online_cpu(mask) 0
406#endif 406#endif
407 407
408#define for_each_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map) 408#define for_each_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map)
409#define for_each_possible_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map)
409#define for_each_online_cpu(cpu) for_each_cpu_mask((cpu), cpu_online_map) 410#define for_each_online_cpu(cpu) for_each_cpu_mask((cpu), cpu_online_map)
410#define for_each_present_cpu(cpu) for_each_cpu_mask((cpu), cpu_present_map) 411#define for_each_present_cpu(cpu) for_each_cpu_mask((cpu), cpu_present_map)
411 412