summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/cpumask.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/cpumask.c b/lib/cpumask.c
index 1560d97390dd..ba2f8543052c 100644
--- a/lib/cpumask.c
+++ b/lib/cpumask.c
@@ -9,3 +9,8 @@ int __first_cpu(const cpumask_t *srcp)
}
EXPORT_SYMBOL(__first_cpu);
+int __next_cpu(int n, const cpumask_t *srcp)
+{
+ return min_t(int, NR_CPUS, find_next_bit(srcp->bits, NR_CPUS, n+1));
+}
+EXPORT_SYMBOL(__next_cpu);
OpenPOWER on IntegriCloud