diff options
Diffstat (limited to '')
| -rw-r--r-- | kernel/mm/physical_mm/bitmap.c (renamed from kernel/mm/physical_mm/bitmap.cc) | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/kernel/mm/physical_mm/bitmap.cc b/kernel/mm/physical_mm/bitmap.c index 1c1285d..1fea30c 100644 --- a/kernel/mm/physical_mm/bitmap.cc +++ b/kernel/mm/physical_mm/bitmap.c @@ -20,11 +20,10 @@ #include <stdbool.h> #include <stdint.h> -namespace PhysicalMM -{ - void -set_used(const uint32_t bit, uint32_t *total_free_blocks, uint32_t *memory_map) +pmm_set_used(const uint32_t bit, + uint32_t *total_free_blocks, + uint32_t *memory_map) { uint32_t memory_map_index = bit / BITMAP_ENTRY_SIZE; uint32_t bitmask = 1 << (bit % BITMAP_ENTRY_SIZE); @@ -33,9 +32,9 @@ set_used(const uint32_t bit, uint32_t *total_free_blocks, uint32_t *memory_map) } void -set_usable(const uint32_t bit, - uint32_t *total_free_blocks, - uint32_t *memory_map) +pmm_set_usable(const uint32_t bit, + uint32_t *total_free_blocks, + uint32_t *memory_map) { uint32_t memory_map_index = bit / BITMAP_ENTRY_SIZE; uint32_t bitmask = 1 << (bit % BITMAP_ENTRY_SIZE); @@ -44,11 +43,9 @@ set_usable(const uint32_t bit, } bool -test_bit(const uint32_t bit, uint32_t *memory_map) +pmm_test_bit(const uint32_t bit, uint32_t *memory_map) { uint32_t memory_map_index = bit / BITMAP_ENTRY_SIZE; uint32_t bitmask = 1 << (bit % BITMAP_ENTRY_SIZE); return memory_map[memory_map_index] & bitmask; } - -} |
