diff options
Diffstat (limited to 'include/osmocom/core')
-rw-r--r-- | include/osmocom/core/bitvec.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/osmocom/core/bitvec.h b/include/osmocom/core/bitvec.h index da2d4e45..bd107093 100644 --- a/include/osmocom/core/bitvec.h +++ b/include/osmocom/core/bitvec.h @@ -93,4 +93,10 @@ static inline unsigned int bitvec_used_bytes(const struct bitvec *bv) return bytes; } +/*! Return the tailroom in number of unused bits remaining in the bit-vector */ +static inline unsigned int bitvec_tailroom_bits(const struct bitvec *bv) +{ + return bv->data_len*8 - bv->cur_bit; +} + /*! @} */ |