/****************************************************************************
query a bit in a bitmap
****************************************************************************/
-bool bitmap_query(struct bitmap *bm, unsigned i)
+bool bitmap_query(const struct bitmap * const bm, unsigned i)
{
if (i >= bm->n) return false;
if (bm->b[i/32] & (1U<<(i%32))) {
find a zero bit in a bitmap starting at the specified offset, with
wraparound
****************************************************************************/
-int bitmap_find(struct bitmap *bm, unsigned ofs)
+int bitmap_find(const struct bitmap * const bm, unsigned ofs)
{
unsigned int i, j;
int bitmap_copy(struct bitmap * const dst, const struct bitmap * const src);
bool bitmap_set(struct bitmap *bm, unsigned i);
bool bitmap_clear(struct bitmap *bm, unsigned i);
-bool bitmap_query(struct bitmap *bm, unsigned i);
-int bitmap_find(struct bitmap *bm, unsigned ofs);
+bool bitmap_query(const struct bitmap * const bm, unsigned i);
+int bitmap_find(const struct bitmap * const bm, unsigned ofs);