Subversion Repositories shark

Rev

Rev 422 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
422 giacomo 1
#ifndef __ASM_GENERIC_CPUMASK_CONST_REFERENCE_H
2
#define __ASM_GENERIC_CPUMASK_CONST_REFERENCE_H
3
 
4
struct cpumask_ref {
5
        const cpumask_t *val;
6
};
7
 
8
typedef const struct cpumask_ref cpumask_const_t;
9
 
10
#define mk_cpumask_const(map)           ((cpumask_const_t){ &(map) })
11
#define cpu_isset_const(cpu, map)       cpu_isset(cpu, *(map).val)
12
 
13
#define cpus_and_const(dst,src1,src2)   cpus_and(dst,*(src1).val,*(src2).val)
14
#define cpus_or_const(dst,src1,src2)    cpus_or(dst,*(src1).val,*(src2).val)
15
 
16
#define cpus_equal_const(map1, map2)    cpus_equal(*(map1).val, *(map2).val)
17
 
18
#define cpus_copy_const(map1, map2)     bitmap_copy((map1).mask, (map2).val->mask, NR_CPUS)
19
 
20
#define cpus_empty_const(map)           cpus_empty(*(map).val)
21
#define cpus_weight_const(map)          cpus_weight(*(map).val)
22
#define first_cpu_const(map)            first_cpu(*(map).val)
23
#define next_cpu_const(cpu, map)        next_cpu(cpu, *(map).val)
24
 
25
/* only ever use this for things that are _never_ used on large boxen */
26
#define cpus_coerce_const(map)          cpus_coerce(*(map).val)
27
#define any_online_cpu_const(map)       any_online_cpu(*(map).val)
28
 
29
#endif /* __ASM_GENERIC_CPUMASK_CONST_REFERENCE_H */