[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 04/29] libxc/bitops: Add or() to the available bitmap operations
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CC: Ian Campbell <Ian.Campbell@xxxxxxxxxx> CC: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> --- tools/libxc/xc_bitops.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/libxc/xc_bitops.h b/tools/libxc/xc_bitops.h index d8e0c16..dfce3b8 100644 --- 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 */ -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |