diff options
author | Harald Welte <laforge@gnumonks.org> | 2009-12-14 22:23:27 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2009-12-14 22:23:27 +0100 |
commit | 7f73a1ac58d6b9f2f8ec793123bf0ee3038fb3a4 (patch) | |
tree | f06a49611732216650f56738174c322aa1d4a5f7 /openbsc/include/openbsc/bitvec.h | |
parent | 6c40def716b757a1aa683d9414b2320d3fc20c8a (diff) |
bitvec: Introduce bitvec_get_nth_set_bit() function
This is particularly important for determining the ARFCN for cells
reported in 04.08 MEAS REP.
Diffstat (limited to 'openbsc/include/openbsc/bitvec.h')
-rw-r--r-- | openbsc/include/openbsc/bitvec.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/bitvec.h b/openbsc/include/openbsc/bitvec.h index a365e2a2d..b35aebf16 100644 --- a/openbsc/include/openbsc/bitvec.h +++ b/openbsc/include/openbsc/bitvec.h @@ -42,6 +42,9 @@ struct bitvec { /* check if the bit is 0 or 1 for a given position inside a bitvec */ enum bit_value bitvec_get_bit_pos(struct bitvec *bv, unsigned int bitnr); +/* get the Nth set bit inside the bit vector */ +unsigned int bitvec_get_nth_set_bit(struct bitvec *bv, unsigned int n); + /* Set a bit at given position */ int bitvec_set_bit_pos(struct bitvec *bv, unsigned int bitnum, enum bit_value bit); |