1
0
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:
Alasdair Kergon 2010-04-19 21:23:01 +00:00
parent 175b8684a0
commit 2b707b6806
2 changed files with 8 additions and 0 deletions

View File

@ -1,5 +1,6 @@
Version 1.02.47 -
=================================
Add dm_bit_and.
Simplify dm_bitset_create.
Speed up dm_bit_get_next with ffs().

View File

@ -42,6 +42,13 @@ void dm_bitset_destroy(dm_bitset_t 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)
{
int i;