aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-12-14 22:04:31 +0100
committerHarald Welte <laforge@gnumonks.org>2009-12-14 22:04:31 +0100
commitd57f163bd4040cddf59cb145affba2c2d2570c42 (patch)
tree2077e28f687804a223e749b4c4bb5e8f31f65856 /openbsc/include
parentda760d3d19bc6da3ef676a2fbaa65fb841cd5af5 (diff)
bitvec updates and code simplification
* introduce a new bitvec_get_bit_pos() function to determine the bit value at a given position inside a bit vector * make sure bitvec_{get,set}_bit_pos() share code as possible
Diffstat (limited to 'openbsc/include')
-rw-r--r--openbsc/include/openbsc/bitvec.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/bitvec.h b/openbsc/include/openbsc/bitvec.h
index 80ed4ad0a..a365e2a2d 100644
--- a/openbsc/include/openbsc/bitvec.h
+++ b/openbsc/include/openbsc/bitvec.h
@@ -39,6 +39,9 @@ struct bitvec {
u_int8_t *data; /* pointer to data array */
};
+/* 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);
+
/* Set a bit at given position */
int bitvec_set_bit_pos(struct bitvec *bv, unsigned int bitnum,
enum bit_value bit);