From 15199538948c1d327fb50ef22f5ac9a2589dfc74 Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Fri, 8 Mar 2013 21:11:02 +0100 Subject: kern/bitmap: rename bitmap_init, new bitmap_fill function The bitmap_init function is renamed to bitmap_zero for consistency. --- kern/bitmap.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'kern/bitmap.h') 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; @@ -72,6 +69,15 @@ bitmap_init(unsigned long *bm, int nr_bits) memset(bm, 0, n * sizeof(unsigned long)); } +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) { -- cgit v1.2.3