Rev 3343 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3343 | Rev 3665 | ||
---|---|---|---|
Line 47... | Line 47... | ||
47 | extern void bitmap_initialize(bitmap_t *bitmap, uint8_t *map, count_t bits); |
47 | extern void bitmap_initialize(bitmap_t *bitmap, uint8_t *map, count_t bits); |
48 | extern void bitmap_set_range(bitmap_t *bitmap, index_t start, count_t bits); |
48 | extern void bitmap_set_range(bitmap_t *bitmap, index_t start, count_t bits); |
49 | extern void bitmap_clear_range(bitmap_t *bitmap, index_t start, count_t bits); |
49 | extern void bitmap_clear_range(bitmap_t *bitmap, index_t start, count_t bits); |
50 | extern void bitmap_copy(bitmap_t *dst, bitmap_t *src, count_t bits); |
50 | extern void bitmap_copy(bitmap_t *dst, bitmap_t *src, count_t bits); |
51 | 51 | ||
- | 52 | static inline int bitmap_get(bitmap_t *bitmap,index_t bit) |
|
- | 53 | { |
|
- | 54 | if(bit >= bitmap->bits) |
|
- | 55 | return 0; |
|
- | 56 | return !! ((bitmap->map)[bit/8] & (1 << (bit & 7))); |
|
- | 57 | } |
|
- | 58 | ||
- | 59 | ||
52 | #endif |
60 | #endif |
53 | 61 | ||
54 | /** @} |
62 | /** @} |
55 | */ |
63 | */ |