diff options
Diffstat (limited to 'kern/bitmap.h')
-rw-r--r-- | kern/bitmap.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/kern/bitmap.h b/kern/bitmap.h index fb22d69f..36018bcc 100644 --- a/kern/bitmap.h +++ b/kern/bitmap.h @@ -60,11 +60,8 @@ bitmap_mask(int bit) * Public interface. */ -/* - * Initialize a bitmap, setting all bits to 0. - */ static inline void -bitmap_init(unsigned long *bm, int nr_bits) +bitmap_zero(unsigned long *bm, int nr_bits) { int n; @@ -73,6 +70,15 @@ bitmap_init(unsigned long *bm, int nr_bits) } static inline void +bitmap_fill(unsigned long *bm, int nr_bits) +{ + int n; + + n = BITMAP_LONGS(nr_bits); + memset(bm, 0xff, n * sizeof(unsigned long)); +} + +static inline void bitmap_set(volatile unsigned long *bm, int bit) { if (bit >= LONG_BIT) |