|
AquilaOS documentation
How it works, and its code
|
Go to the source code of this file.
Data Structures | |
| struct | bitmap |
| A bitmap: its blocks, and its last bit's index. More... | |
Macros | |
| #define | BITMAP_BLOCK_SIZE (32) |
| #define | BITMAP_BLOCK_MASK (BITMAP_BLOCK_SIZE - 1) |
| #define | BITMAP_LOG2_BLOCK_SIZE (5) |
| #define | BITMAP_BLOCK_OFFSET(__bitmap__i__) |
| #define | BITMAP_BIT_OFFSET(__bitmap__i__) |
| #define | BITMAP_SIZE(n) |
| #define | BITMAP_NEW(n) |
Typedefs | |
| typedef uint32_t | bitmap_t |
Functions | |
| static size_t | bitmap_size (size_t n) |
| Returns the size in bytes of a bitmap of n bits. | |
| static void | bitmap_set (struct bitmap *bitmap, size_t index) |
| Sets a bit. | |
| static void | bitmap_clear (struct bitmap *bitmap, size_t index) |
| Clears a bit. | |
| static int | bitmap_check (struct bitmap *bitmap, size_t index) |
| Returns whether a bit is set (non-zero if it is). | |
| static void | bitmap_set_range (struct bitmap *bitmap, size_t findex, size_t lindex) |
| Sets the bits from findex to lindex, inclusive. | |
| static void | bitmap_clear_range (struct bitmap *bitmap, size_t findex, size_t lindex) |
| Clears the bits from findex to lindex, inclusive. | |
| #define BITMAP_BIT_OFFSET | ( | __bitmap__i__ | ) |
Definition at line 29 of file bitmap.h.
Referenced by bitmap_check(), bitmap_clear(), and bitmap_set().
| #define BITMAP_BLOCK_MASK (BITMAP_BLOCK_SIZE - 1) |
Definition at line 24 of file bitmap.h.
Referenced by bitmap_clear_range(), bitmap_set_range(), and bitmap_size().
| #define BITMAP_BLOCK_OFFSET | ( | __bitmap__i__ | ) |
Definition at line 28 of file bitmap.h.
Referenced by bitmap_check(), bitmap_clear(), bitmap_clear_range(), bitmap_set(), and bitmap_set_range().
| #define BITMAP_BLOCK_SIZE (32) |
Definition at line 23 of file bitmap.h.
Referenced by bitmap_clear_range(), bitmap_set_range(), and bitmap_size().
| #define BITMAP_NEW | ( | n | ) |
| #define BITMAP_SIZE | ( | n | ) |
Returns whether a bit is set (non-zero if it is).
Definition at line 54 of file bitmap.h.
References BITMAP_BIT_OFFSET, BITMAP_BLOCK_OFFSET, and bitmap::map.
Clears a bit.
Definition at line 48 of file bitmap.h.
References BITMAP_BIT_OFFSET, BITMAP_BLOCK_OFFSET, and bitmap::map.
Referenced by bitmap_clear_range().
Clears the bits from findex to lindex, inclusive.
Definition at line 89 of file bitmap.h.
References BITMAP_BLOCK_MASK, BITMAP_BLOCK_OFFSET, BITMAP_BLOCK_SIZE, bitmap_clear(), bitmap_clear_range(), bitmap::map, MEMBER_SIZE, and memset().
Referenced by bitmap_clear_range(), and buddy_setup().
Sets a bit.
Definition at line 42 of file bitmap.h.
References BITMAP_BIT_OFFSET, BITMAP_BLOCK_OFFSET, and bitmap::map.
Referenced by bitmap_set_range().
Sets the bits from findex to lindex, inclusive.
Definition at line 60 of file bitmap.h.
References BITMAP_BLOCK_MASK, BITMAP_BLOCK_OFFSET, BITMAP_BLOCK_SIZE, bitmap_set(), bitmap_set_range(), bitmap::map, MEMBER_SIZE, and memset().
Referenced by bitmap_set_range(), and buddy_setup().
Returns the size in bytes of a bitmap of n bits.
Definition at line 36 of file bitmap.h.
References BITMAP_BLOCK_MASK, BITMAP_BLOCK_SIZE, bitmap_size(), and MEMBER_SIZE.
Referenced by bitmap_size(), and buddy_setup().