mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Add dm_bit_and. (ejt)
This commit is contained in:
parent
175b8684a0
commit
2b707b6806
@ -1,5 +1,6 @@
|
|||||||
Version 1.02.47 -
|
Version 1.02.47 -
|
||||||
=================================
|
=================================
|
||||||
|
Add dm_bit_and.
|
||||||
Simplify dm_bitset_create.
|
Simplify dm_bitset_create.
|
||||||
Speed up dm_bit_get_next with ffs().
|
Speed up dm_bit_get_next with ffs().
|
||||||
|
|
||||||
|
@ -42,6 +42,13 @@ void dm_bitset_destroy(dm_bitset_t bs)
|
|||||||
dm_free(bs);
|
dm_free(bs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void dm_bit_and(dm_bitset_t out, dm_bitset_t in1, dm_bitset_t in2)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = (in1[0] / DM_BITS_PER_INT) + 1; i; i--)
|
||||||
|
out[i] = in1[i] & in2[i];
|
||||||
|
}
|
||||||
void dm_bit_union(dm_bitset_t out, dm_bitset_t in1, dm_bitset_t in2)
|
void dm_bit_union(dm_bitset_t out, dm_bitset_t in1, dm_bitset_t in2)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
Loading…
Reference in New Issue
Block a user