diff options
| author | Pravin Kumarvel <pmanohar@radisys.com> | 2016-12-02 15:13:03 +0530 | 
|---|---|---|
| committer | Harald Welte <laforge@gnumonks.org> | 2017-01-06 10:37:42 +0000 | 
| commit | 848de8f1df561f4253f754ec3f2415e541071420 (patch) | |
| tree | e0d2286ddcbb19791fedc1dd28cbc2609c7b85b4 /include | |
| parent | 592fcc97c004b7e3e84ed6960ea9989157c94f75 (diff) | |
Add function to get uninterrupted bit run
Function bitvec_rl_curbit added to get number of  uninterrupted
bits run in vector starting from the current bit till max number
of bits.
Test case is added to check bitvec_rl_curbit.
Change-Id: Iae153d3639ea6b891c1fc10d7801a435c9492e26
Diffstat (limited to 'include')
| -rw-r--r-- | include/osmocom/core/bitvec.h | 1 | 
1 files changed, 1 insertions, 0 deletions
diff --git a/include/osmocom/core/bitvec.h b/include/osmocom/core/bitvec.h index 19e2af8a..0e17ba7a 100644 --- a/include/osmocom/core/bitvec.h +++ b/include/osmocom/core/bitvec.h @@ -89,6 +89,7 @@ char bit_value_to_char(enum bit_value v);  void bitvec_to_string_r(const struct bitvec *bv, char *str);  void bitvec_zero(struct bitvec *bv);  unsigned bitvec_rl(const struct bitvec *bv, bool b); +unsigned bitvec_rl_curbit(struct bitvec *bv, bool b, int max_bits);  void bitvec_shiftl(struct bitvec *bv, unsigned int n);  int16_t bitvec_get_int16_msb(const struct bitvec *bv, unsigned int num_bits);  unsigned int bitvec_add_array(struct bitvec *bv, const uint32_t *array,  | 
