ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / include / asm-generic / cpumask.h
1 #ifndef __ASM_GENERIC_CPUMASK_H
2 #define __ASM_GENERIC_CPUMASK_H
3
4 #include <linux/config.h>
5 #include <linux/kernel.h>
6 #include <linux/threads.h>
7 #include <linux/types.h>
8 #include <linux/bitmap.h>
9
10 #if NR_CPUS > BITS_PER_LONG && NR_CPUS != 1
11 #define CPU_ARRAY_SIZE          BITS_TO_LONGS(NR_CPUS)
12
13 struct cpumask
14 {
15         unsigned long mask[CPU_ARRAY_SIZE];
16 };
17
18 typedef struct cpumask cpumask_t;
19
20 #else
21 typedef unsigned long cpumask_t;
22 #endif
23
24 #ifdef CONFIG_SMP
25 #if NR_CPUS > BITS_PER_LONG
26 #include <asm-generic/cpumask_array.h>
27 #else
28 #include <asm-generic/cpumask_arith.h>
29 #endif
30 #else
31 #include <asm-generic/cpumask_up.h>
32 #endif
33
34 #if NR_CPUS <= 4*BITS_PER_LONG
35 #include <asm-generic/cpumask_const_value.h>
36 #else
37 #include <asm-generic/cpumask_const_reference.h>
38 #endif
39
40 #endif /* __ASM_GENERIC_CPUMASK_H */