New bit map manipulation header.

General purpose.
This commit is contained in:
Jorrit Herder 2005-06-20 14:29:09 +00:00
parent ec24a0798c
commit d78cf7fbaf

11
include/minix/bitmap.h Normal file
View file

@ -0,0 +1,11 @@
#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 */