From 831bc7ecd1718a0a0dd4f7b9af52604fd377b9df Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Tue, 20 Jun 2006 09:50:26 +0000 Subject: [PATCH] Move bitmap manipulation macros to --- kernel/const.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/kernel/const.h b/kernel/const.h index 1c5bc88ee..af4b7c95d 100755 --- a/kernel/const.h +++ b/kernel/const.h @@ -7,6 +7,8 @@ #include /* BIOS addresses, sizes and magic numbers */ #include /* BIOS addresses, sizes and magic numbers */ #include +#include + #include "config.h" /* To translate an address in kernel space to a physical address. This is @@ -34,15 +36,6 @@ /* Number of random sources */ #define RANDOM_SOURCES 16 -/* Constants and macros for bit map manipulation. */ -#define BITCHUNK_BITS (sizeof(bitchunk_t) * CHAR_BIT) -#define BITMAP_CHUNKS(nr_bits) (((nr_bits)+BITCHUNK_BITS-1)/BITCHUNK_BITS) -#define MAP_CHUNK(map,bit) (map)[((bit)/BITCHUNK_BITS)] -#define CHUNK_OFFSET(bit) ((bit)%BITCHUNK_BITS)) -#define GET_BIT(map,bit) ( MAP_CHUNK(map,bit) & (1 << CHUNK_OFFSET(bit) ) -#define SET_BIT(map,bit) ( MAP_CHUNK(map,bit) |= (1 << CHUNK_OFFSET(bit) ) -#define UNSET_BIT(map,bit) ( MAP_CHUNK(map,bit) &= ~(1 << CHUNK_OFFSET(bit) ) - #define get_sys_bit(map,bit) \ ( MAP_CHUNK(map.chunk,bit) & (1 << CHUNK_OFFSET(bit) ) #define set_sys_bit(map,bit) \