diff options
author | Richard Braun <rbraun@sceen.net> | 2013-03-08 21:11:02 +0100 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2013-03-08 21:11:02 +0100 |
commit | 15199538948c1d327fb50ef22f5ac9a2589dfc74 (patch) | |
tree | 8dc9033600281e3f7eb393bf41c06c4e2d9089ce /kern/bitmap.h | |
parent | fd6d3fc0f5ea8fa68dbe265ff30cabe0a9aa2506 (diff) |
kern/bitmap: rename bitmap_init, new bitmap_fill function
The bitmap_init function is renamed to bitmap_zero for consistency.
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) |