projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
220c8fe
)
libxc/bitops: Add or() to the available bitmap operations
author
Andrew Cooper
<andrew.cooper3@citrix.com>
Wed, 10 Sep 2014 17:10:42 +0000
(18:10 +0100)
committer
Ian Campbell
<ian.campbell@citrix.com>
Thu, 11 Sep 2014 10:58:02 +0000
(11:58 +0100)
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxc/xc_bitops.h
patch
|
blob
|
history
diff --git
a/tools/libxc/xc_bitops.h
b/tools/libxc/xc_bitops.h
index d8e0c168d7034b64d65504cd55f301fe40261b69..dfce3b869520d3c7042ecbaa9aebc7894df6cb2d 100644
(file)
--- a/
tools/libxc/xc_bitops.h
+++ b/
tools/libxc/xc_bitops.h
@@
-60,4
+60,12
@@
static inline int test_and_set_bit(int nr, unsigned long *addr)
return oldbit;
}
+static inline void bitmap_or(unsigned long *dst, const unsigned long *other,
+ int nr_bits)
+{
+ int i, nr_longs = (bitmap_size(nr_bits) / sizeof(unsigned long));
+ for ( i = 0; i < nr_longs; ++i )
+ dst[i] |= other[i];
+}
+
#endif /* XC_BITOPS_H */