diff options
Diffstat (limited to 'include/linux/cpumask.h')
-rw-r--r-- | include/linux/cpumask.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 796df12091b7..9b1d458aac6e 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
@@ -715,6 +715,18 @@ static inline int cpumask_test_and_set_cpu(int cpu, struct cpumask *cpumask) | |||
715 | } | 715 | } |
716 | 716 | ||
717 | /** | 717 | /** |
718 | * cpumask_test_and_clear_cpu - atomically test and clear a cpu in a cpumask | ||
719 | * @cpu: cpu number (< nr_cpu_ids) | ||
720 | * @cpumask: the cpumask pointer | ||
721 | * | ||
722 | * test_and_clear_bit wrapper for cpumasks. | ||
723 | */ | ||
724 | static inline int cpumask_test_and_clear_cpu(int cpu, struct cpumask *cpumask) | ||
725 | { | ||
726 | return test_and_clear_bit(cpumask_check(cpu), cpumask_bits(cpumask)); | ||
727 | } | ||
728 | |||
729 | /** | ||
718 | * cpumask_setall - set all cpus (< nr_cpu_ids) in a cpumask | 730 | * cpumask_setall - set all cpus (< nr_cpu_ids) in a cpumask |
719 | * @dstp: the cpumask pointer | 731 | * @dstp: the cpumask pointer |
720 | */ | 732 | */ |