Commit 5b85eca0 authored by Michael Beck's avatar Michael Beck
Browse files

- add rbitset_set_all()

[r25702]
parent 988039bf
......@@ -159,6 +159,18 @@ static inline void rbitset_set(unsigned *bitset, unsigned pos) {
BITSET_ELEM(bitset,pos) |= 1 << (pos % BITS_PER_ELEM);
}
/**
* Set all bits in a given bitset.
*
* @param bitset the bitset
* @param size number of bits in the bitset
*/
static inline void rbitset_set_all(unsigned *bitset, unsigned size) {
unsigned size_bytes = BITSET_SIZE_BYTES(size);
memset(bitset, ~0, size_bytes);
}
/**
* Clear a bit at position pos.
*
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment