Last change
on this file since 25 was 4, checked in by Mattia Monga, 14 years ago |
Importazione sorgenti libro
|
File size:
356 bytes
|
Rev | Line | |
---|
[4] | 1 | #ifndef _BITMAP_H
|
---|
| 2 | #define _BITMAP_H
|
---|
| 3 |
|
---|
| 4 | /* Bit map operations to manipulate bits of a simple mask variable. */
|
---|
| 5 | #define bit_set(mask, n) ((mask) |= (1 << (n)))
|
---|
| 6 | #define bit_unset(mask, n) ((mask) &= ~(1 << (n)))
|
---|
| 7 | #define bit_isset(mask, n) ((mask) & (1 << (n)))
|
---|
| 8 | #define bit_empty(mask) ((mask) = 0)
|
---|
| 9 | #define bit_fill(mask) ((mask) = ~0)
|
---|
| 10 |
|
---|
| 11 | #endif /* _BITMAP_H */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.