Fixed brackets in bitmap macros
This commit is contained in:
		
							parent
							
								
									f2b87f5fb7
								
							
						
					
					
						commit
						63e2d73d1b
					
				@ -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 */
 | 
			
		||||
 | 
			
		||||
@ -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 */
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user