connect failure scenarios

This commit is contained in:
Alex Young
2012-06-22 10:05:41 +01:00
parent 80f298f6cd
commit 2078d17053
28 changed files with 1674 additions and 225 deletions

View File

@@ -120,6 +120,17 @@ static inline void bitset_set_range(
bit_set_range(set->bits, first, bitlen);
}
/** Set every bit in the bitset. */
static inline void bitset_set(
struct bitset_mapping* set
)
{
bitset_set_range(set, 0, set->size);
}
/** Clear the bits in a bitset which correspond to the given bytes in the
* larger file.
*/
@@ -132,6 +143,16 @@ static inline void bitset_clear_range(
bit_clear_range(set->bits, first, bitlen);
}
/** Clear every bit in the bitset. */
static inline void bitset_clear(
struct bitset_mapping *set
)
{
bitset_clear_range(set, 0, set->size);
}
/** Counts the number of contiguous bytes that are represented as a run in
* the bit field.
*/