|
#define | cpumask_bits(maskp) ((maskp)->bits) |
|
#define | nr_cpumask_bits NR_CPUS |
|
#define | num_online_cpus() 1U |
|
#define | num_possible_cpus() 1U |
|
#define | num_present_cpus() 1U |
|
#define | num_active_cpus() 1U |
|
#define | cpu_online(cpu) ((cpu) == 0) |
|
#define | cpu_possible(cpu) ((cpu) == 0) |
|
#define | cpu_present(cpu) ((cpu) == 0) |
|
#define | cpu_active(cpu) ((cpu) == 0) |
|
#define | for_each_cpu(cpu, mask) |
|
#define | for_each_cpu_not(cpu, mask) |
|
#define | for_each_cpu_and(cpu, mask, and) |
|
#define | CPU_BITS_NONE |
|
#define | CPU_BITS_CPU0 |
|
#define | cpumask_test_cpu(cpu, cpumask) test_bit(cpumask_check(cpu), cpumask_bits((cpumask))) |
|
#define | cpumask_any(srcp) cpumask_first(srcp) |
|
#define | cpumask_first_and(src1p, src2p) cpumask_next_and(-1, (src1p), (src2p)) |
|
#define | cpumask_any_and(mask1, mask2) cpumask_first_and((mask1), (mask2)) |
|
#define | cpumask_of(cpu) (get_cpu_mask(cpu)) |
|
#define | cpu_all_mask to_cpumask(cpu_all_bits) |
|
#define | cpu_none_mask to_cpumask(cpu_bit_bitmap[0]) |
|
#define | for_each_possible_cpu(cpu) for_each_cpu((cpu), cpu_possible_mask) |
|
#define | for_each_online_cpu(cpu) for_each_cpu((cpu), cpu_online_mask) |
|
#define | for_each_present_cpu(cpu) for_each_cpu((cpu), cpu_present_mask) |
|
#define | to_cpumask(bitmap) |
|
#define | cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) |
|
#define | CPU_BITS_ALL |
|
#define | cpumask_of_cpu(cpu) (*get_cpu_mask(cpu)) |
|
#define | CPU_MASK_LAST_WORD BITMAP_LAST_WORD_MASK(NR_CPUS) |
|
#define | CPU_MASK_ALL |
|
#define | CPU_MASK_NONE |
|
#define | CPU_MASK_CPU0 |
|
#define | first_cpu(src) __first_cpu(&(src)) |
|
#define | next_cpu(n, src) __next_cpu((n), &(src)) |
|
#define | any_online_cpu(mask) cpumask_any_and(&mask, cpu_online_mask) |
|
#define | for_each_cpu_mask(cpu, mask) |
|
#define | for_each_cpu_mask_nr(cpu, mask) for_each_cpu_mask(cpu, mask) |
|
#define | cpus_addr(src) ((src).bits) |
|
#define | cpu_set(cpu, dst) __cpu_set((cpu), &(dst)) |
|
#define | cpu_clear(cpu, dst) __cpu_clear((cpu), &(dst)) |
|
#define | cpus_setall(dst) __cpus_setall(&(dst), NR_CPUS) |
|
#define | cpus_clear(dst) __cpus_clear(&(dst), NR_CPUS) |
|
#define | cpu_isset(cpu, cpumask) test_bit((cpu), (cpumask).bits) |
|
#define | cpu_test_and_set(cpu, cpumask) __cpu_test_and_set((cpu), &(cpumask)) |
|
#define | cpus_and(dst, src1, src2) __cpus_and(&(dst), &(src1), &(src2), NR_CPUS) |
|
#define | cpus_or(dst, src1, src2) __cpus_or(&(dst), &(src1), &(src2), NR_CPUS) |
|
#define | cpus_xor(dst, src1, src2) __cpus_xor(&(dst), &(src1), &(src2), NR_CPUS) |
|
#define | cpus_andnot(dst, src1, src2) __cpus_andnot(&(dst), &(src1), &(src2), NR_CPUS) |
|
#define | cpus_equal(src1, src2) __cpus_equal(&(src1), &(src2), NR_CPUS) |
|
#define | cpus_intersects(src1, src2) __cpus_intersects(&(src1), &(src2), NR_CPUS) |
|
#define | cpus_subset(src1, src2) __cpus_subset(&(src1), &(src2), NR_CPUS) |
|
#define | cpus_empty(src) __cpus_empty(&(src), NR_CPUS) |
|
#define | cpus_weight(cpumask) __cpus_weight(&(cpumask), NR_CPUS) |
|
#define | cpus_shift_left(dst, src, n) __cpus_shift_left(&(dst), &(src), (n), NR_CPUS) |
|
Value:for_each_cpu_and - iterate over every cpu in both masks : the (optionally unsigned) integer iterator : the first cpumask pointer : the second cpumask pointer
This saves a temporary CPU mask in many places. It is equivalent to: struct cpumask tmp; cpumask_and(&tmp, &mask, &and); for_each_cpu(cpu, &tmp) ...
After the loop, cpu is >= nr_cpu_ids.
Definition at line 234 of file cpumask.h.
Value:
: (
void *)
sizeof(__check_is_bitmap(
bitmap))))
to_cpumask - convert an NR_CPUS bitmap to a struct cpumask * : the bitmap
There are a few places where cpumask_var_t isn't appropriate and static cpumasks must be used (eg. very early boot), yet we don't expose the definition of 'struct cpumask'.
This does the conversion, and can be used as a constant initializer.
Definition at line 729 of file cpumask.h.