summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/bitmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/bitmap.c')
-rw-r--r--tools/perf/util/bitmap.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/perf/util/bitmap.c b/tools/perf/util/bitmap.c
index 5e230ac..0a1adc1 100644
--- a/tools/perf/util/bitmap.c
+++ b/tools/perf/util/bitmap.c
@@ -19,3 +19,13 @@ int __bitmap_weight(const unsigned long *bitmap, int bits)
return w;
}
+
+void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1,
+ const unsigned long *bitmap2, int bits)
+{
+ int k;
+ int nr = BITS_TO_LONGS(bits);
+
+ for (k = 0; k < nr; k++)
+ dst[k] = bitmap1[k] | bitmap2[k];
+}
OpenPOWER on IntegriCloud