From b71df26177d390a2d474cbd0e399da98e518e2ce Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Wed, 15 May 2013 01:20:10 +0200 Subject: kern/bitmap: new bitmap_copy function --- kern/bitmap.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'kern/bitmap.h') diff --git a/kern/bitmap.h b/kern/bitmap.h index 9fc92986..526824d6 100644 --- a/kern/bitmap.h +++ b/kern/bitmap.h @@ -92,6 +92,15 @@ bitmap_fill(unsigned long *bm, int nr_bits) memset(bm, 0xff, n * sizeof(unsigned long)); } +static inline void +bitmap_copy(unsigned long *dest, const unsigned long *src, int nr_bits) +{ + int n; + + n = BITMAP_LONGS(nr_bits); + memcpy(dest, src, n * sizeof(unsigned long)); +} + static inline void bitmap_set(unsigned long *bm, int bit) { -- cgit v1.2.3