From 36bdf2cb73a82548cc1a6a9e332a4e646a5868b2 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 28 Mar 2011 19:24:19 +0200 Subject: bitvec: add bitvec_find_first_bit_pos() from gsm/rxlev_stat.c This patch adds bitvec_find_bit_pos() to bitvec.c where it really belongs to. Before this patch used to be part of gsm/rxlev_stat.c --- include/osmocom/core/bitvec.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/osmocom/core') diff --git a/include/osmocom/core/bitvec.h b/include/osmocom/core/bitvec.h index 42977fb2..bbe1641b 100644 --- a/include/osmocom/core/bitvec.h +++ b/include/osmocom/core/bitvec.h @@ -68,6 +68,8 @@ int bitvec_set_uint(struct bitvec *bv, unsigned int in, int count); /* get multiple bits (based on numeric value) from current pos */ int bitvec_get_uint(struct bitvec *bv, int num_bits); +/* find the first bit set in bit vector */ +int bitvec_find_bit_pos(const struct bitvec *bv, unsigned int n, enum bit_value val); /* Pad the bit vector up to a certain bit position */ int bitvec_spare_padding(struct bitvec *bv, unsigned int up_to_bit); -- cgit v1.2.3