Lines Matching refs:bm
18 int ext2_bitmap_set(uint8_t *bm, uint32_t index, uint32_t size) in ext2_bitmap_set() argument
30 __ASSERT((bm[idx] & BIT(off)) == 0, "Bit %d set in bitmap", index); in ext2_bitmap_set()
32 LOG_DBG("Bitmap %d: %x", idx, bm[idx]); in ext2_bitmap_set()
33 bm[idx] |= BIT(off); in ext2_bitmap_set()
34 LOG_DBG("Bitmap %d: %x", idx, bm[idx]); in ext2_bitmap_set()
39 int ext2_bitmap_unset(uint8_t *bm, uint32_t index, uint32_t size) in ext2_bitmap_unset() argument
51 __ASSERT(bm[idx] & BIT(off), "Bit %d not set in bitmap", index); in ext2_bitmap_unset()
53 LOG_DBG("Bitmap %d: %x", idx, bm[idx]); in ext2_bitmap_unset()
54 bm[idx] &= ~BIT(off); in ext2_bitmap_unset()
55 LOG_DBG("Bitmap %d: %x", idx, bm[idx]); in ext2_bitmap_unset()
60 int32_t ext2_bitmap_find_free(uint8_t *bm, uint32_t size) in ext2_bitmap_find_free() argument
63 LOG_DBG("Bitmap %d: %x (%x)", i, bm[i], ~bm[i]); in ext2_bitmap_find_free()
64 if (bm[i] < UINT8_MAX) { in ext2_bitmap_find_free()
66 int off = find_lsb_set(~bm[i]) - 1; in ext2_bitmap_find_free()
75 uint32_t ext2_bitmap_count_set(uint8_t *bm, uint32_t size) in ext2_bitmap_count_set() argument
80 uint8_t val = bm[i / 8]; in ext2_bitmap_count_set()