minix/include/minix/bitmap.h
Jorrit Herder d78cf7fbaf New bit map manipulation header.
General purpose.
2005-06-20 14:29:09 +00:00

12 lines
356 B
C

#ifndef _BITMAP_H
#define _BITMAP_H
/* Bit map operations to manipulate bits of a simple mask variable. */
#define bit_set(mask, n) ((mask) |= (1 << (n)))
#define bit_unset(mask, n) ((mask) &= ~(1 << (n)))
#define bit_isset(mask, n) ((mask) & (1 << (n)))
#define bit_empty(mask) ((mask) = 0)
#define bit_fill(mask) ((mask) = ~0)
#endif /* _BITMAP_H */