* alignment.
*
* @param area A pointer to memory reserved for the bitset.
- * @param units The number of units that are allocated for the bitset.
+ * @param size The size of the bitset in bits.
* @return A pointer to the initialized bitset.
*/
static INLINE bitset_t *_bitset_prepare(void *area, bitset_pos_t size)
#define bitset_capacity(bs) ((bs)->units * BS_UNIT_SIZE_BITS)
/**
- * Get the highest bit which can be stored in the bitset.
+ * Get the size of the bitset in bits.
+ * @note Note the difference between capacity and size.
* @param bs The bitset.
- * @return The highest bit which can be set or cleared.
+ * @return The highest bit which can be set or cleared plus 1.
*/
#define bistet_size(bs) ((bs)->size)
* @note Note that if pos is set, pos is returned.
* @param bs The bitset.
* @param pos The bit from which to search for the next set bit.
+ * @param set if 1, serach for set bits, else for unset bits
* @return The next set bit from pos on, or -1, if no set bit was found
* after pos.
*/