From: Tomas Hruby Date: Tue, 30 Mar 2010 08:34:33 +0000 (+0000) Subject: Fixed brackets in bitmap macros X-Git-Tag: v3.1.7~192 X-Git-Url: http://zhaoyanbai.com/repos/?a=commitdiff_plain;h=63e2d73d1b059e95c3b1a73194a2596787d3122f;p=minix.git Fixed brackets in bitmap macros --- diff --git a/include/minix/bitmap.h b/include/minix/bitmap.h index f4858eb38..6de75fe7a 100644 --- a/include/minix/bitmap.h +++ b/include/minix/bitmap.h @@ -12,9 +12,9 @@ #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 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) )) #endif /* _BITMAP_H */ diff --git a/kernel/const.h b/kernel/const.h index 3f40ef9bb..55ddc2743 100644 --- a/kernel/const.h +++ b/kernel/const.h @@ -17,13 +17,13 @@ #define _DST_ 1 #define get_sys_bit(map,bit) \ - ( MAP_CHUNK(map.chunk,bit) & (1 << CHUNK_OFFSET(bit) ) + ( MAP_CHUNK(map.chunk,bit) & (1 << CHUNK_OFFSET(bit) )) #define get_sys_bits(map,bit) \ ( MAP_CHUNK(map.chunk,bit) ) #define set_sys_bit(map,bit) \ - ( MAP_CHUNK(map.chunk,bit) |= (1 << CHUNK_OFFSET(bit) ) + ( MAP_CHUNK(map.chunk,bit) |= (1 << CHUNK_OFFSET(bit) )) #define unset_sys_bit(map,bit) \ - ( MAP_CHUNK(map.chunk,bit) &= ~(1 << CHUNK_OFFSET(bit) ) + ( MAP_CHUNK(map.chunk,bit) &= ~(1 << CHUNK_OFFSET(bit) )) /* args to intr_init() */ #define INTS_ORIG 0 /* restore interrupts */