diff options
Diffstat (limited to 'kernel/include/mm/physical_mm.h')
-rw-r--r-- | kernel/include/mm/physical_mm.h | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/kernel/include/mm/physical_mm.h b/kernel/include/mm/physical_mm.h index 0058cc5..b5631c5 100644 --- a/kernel/include/mm/physical_mm.h +++ b/kernel/include/mm/physical_mm.h @@ -31,27 +31,22 @@ /* This is the maximum number of blocks for a 4GiB system. */ #define MAX_BLOCKS 1048576 -#ifdef __cplusplus -extern "C" { -#endif - -void physical_mm_init(void); - -uint32_t physical_mm_find_free_block(void); +namespace PhysicalMM +{ + +void init(void); +uint32_t find_free_block(void); +void *allocate_block(void); +void free_block(void *physical_address); + +void 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); +bool test_bit(const uint32_t bit, uint32_t *memory_map); -void *physical_mm_allocate_block(void); -void physical_mm_free_block(void *physical_address); - -void physical_mm_set_used(const uint32_t bit, - uint32_t *total_free_blocks, - uint32_t *memory_map); -void physical_mm_set_usable(const uint32_t bit, - uint32_t *total_free_blocks, - uint32_t *memory_map); -bool physical_mm_test_bit(const uint32_t bit, uint32_t *memory_map); - -#ifdef __cplusplus } -#endif #endif |