summaryrefslogtreecommitdiffstats
path: root/lib/cpumask.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cpumask.c')
-rw-r--r--lib/cpumask.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/cpumask.c b/lib/cpumask.c
new file mode 100644
index 000000000000..1560d97390dd
--- /dev/null
+++ b/lib/cpumask.c
@@ -0,0 +1,11 @@
+#include <linux/kernel.h>
+#include <linux/bitops.h>
+#include <linux/cpumask.h>
+#include <linux/module.h>
+
+int __first_cpu(const cpumask_t *srcp)
+{
+ return min_t(int, NR_CPUS, find_first_bit(srcp->bits, NR_CPUS));
+}
+EXPORT_SYMBOL(__first_cpu);
+