Implement bitmap_complement() in the LinuxKPI.

Submitted by:	Johannes Lundberg <johalun0@gmail.com>
MFC after:	1 week
Sponsored by:	Mellanox Technologies
This commit is contained in:
Hans Petter Selasky 2018-05-31 12:48:24 +00:00
parent c891735cf7
commit 7ce7605ece

View File

@ -243,6 +243,17 @@ bitmap_equal(const unsigned long *pa,
return (1);
}
static inline void
bitmap_complement(unsigned long *dst, const unsigned long *src,
const unsigned int size)
{
const unsigned int end = BITS_TO_LONGS(size);
unsigned int i;
for (i = 0; i != end; i++)
dst[i] = ~src[i];
}
static inline void
bitmap_or(unsigned long *dst, const unsigned long *src1,
const unsigned long *src2, const unsigned int size)