New bit map manipulation header.
General purpose.
This commit is contained in:
parent
ec24a0798c
commit
d78cf7fbaf
1 changed files with 11 additions and 0 deletions
11
include/minix/bitmap.h
Normal file
11
include/minix/bitmap.h
Normal 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 */
|
Loading…
Reference in a new issue