summaryrefslogtreecommitdiff
path: root/lib/cpumask.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-03-25 14:08:08 +0300
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 19:22:59 +0300
commitccb46000f4bb459777686611157ac0eac928704e (patch)
tree461e956d9e27a7afa7de64950f3186070ffa61f5 /lib/cpumask.c
parent64b91379439ff0fb007bde90eb496299c14a9b2a (diff)
downloadlinux-ccb46000f4bb459777686611157ac0eac928704e.tar.xz
[PATCH] cpumask: uninline first_cpu()
text data bss dec hex filename before: 3490577 1322408 360000 5172985 4eeef9 vmlinux after: 3488027 1322496 360128 5170651 4ee5db vmlinux Cc: Paul Jackson <pj@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
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);
+