Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linuxkpi/common/include/linux/bitmap.h
Show First 20 Lines • Show All 238 Lines • ▼ Show 20 Lines | if (tail) { | ||||
if ((pa[end] ^ pb[end]) & mask) | if ((pa[end] ^ pb[end]) & mask) | ||||
return (0); | return (0); | ||||
} | } | ||||
return (1); | return (1); | ||||
} | } | ||||
static inline void | static inline void | ||||
bitmap_complement(unsigned long *dst, const unsigned long *src, | |||||
unsigned size) | |||||
{ | |||||
const unsigned int end = BIT_WORD(size); | |||||
const unsigned int tail = size & (BITS_PER_LONG - 1); | |||||
unsigned int i; | |||||
for (i = 0; i != end; i++) | |||||
dst[i] = ~src[i]; | |||||
if (tail) | |||||
dst[i] = ~src[i]; | |||||
} | |||||
static inline void | |||||
bitmap_or(unsigned long *dst, const unsigned long *src1, | bitmap_or(unsigned long *dst, const unsigned long *src1, | ||||
const unsigned long *src2, const unsigned int size) | const unsigned long *src2, const unsigned int size) | ||||
{ | { | ||||
const unsigned int end = BITS_TO_LONGS(size); | const unsigned int end = BITS_TO_LONGS(size); | ||||
unsigned int i; | unsigned int i; | ||||
for (i = 0; i != end; i++) | for (i = 0; i != end; i++) | ||||
dst[i] = src1[i] | src2[i]; | dst[i] = src1[i] | src2[i]; | ||||
Show All 25 Lines |