All: rename every function from UpperCamelCase to snake_case
This was a mess since I didn't know which to use but now I decided to go with snake_case :)
This commit is contained in:
@@ -16,13 +16,13 @@
|
||||
|
||||
static MMU* s_instance = nullptr;
|
||||
|
||||
void MMU::Intialize()
|
||||
void MMU::intialize()
|
||||
{
|
||||
ASSERT(s_instance == nullptr);
|
||||
s_instance = new MMU();
|
||||
}
|
||||
|
||||
MMU& MMU::Get()
|
||||
MMU& MMU::get()
|
||||
{
|
||||
ASSERT(s_instance);
|
||||
return *s_instance;
|
||||
@@ -89,7 +89,7 @@ MMU::~MMU()
|
||||
kfree(pml4);
|
||||
}
|
||||
|
||||
void MMU::AllocatePage(uintptr_t address)
|
||||
void MMU::allocate_page(uintptr_t address)
|
||||
{
|
||||
ASSERT((address >> 48) == 0);
|
||||
|
||||
@@ -129,15 +129,15 @@ void MMU::AllocatePage(uintptr_t address)
|
||||
}
|
||||
}
|
||||
|
||||
void MMU::AllocateRange(uintptr_t address, ptrdiff_t size)
|
||||
void MMU::allocate_range(uintptr_t address, ptrdiff_t size)
|
||||
{
|
||||
uintptr_t s_page = address & PAGE_MASK;
|
||||
uintptr_t e_page = (address + size - 1) & PAGE_MASK;
|
||||
for (uintptr_t page = s_page; page <= e_page; page += PAGE_SIZE)
|
||||
AllocatePage(page);
|
||||
allocate_page(page);
|
||||
}
|
||||
|
||||
void MMU::UnAllocatePage(uintptr_t address)
|
||||
void MMU::unallocate_page(uintptr_t address)
|
||||
{
|
||||
ASSERT((address >> 48) == 0);
|
||||
|
||||
@@ -177,10 +177,10 @@ cleanup_done:
|
||||
asm volatile("invlpg (%0)" :: "r"(address) : "memory");
|
||||
}
|
||||
|
||||
void MMU::UnAllocateRange(uintptr_t address, ptrdiff_t size)
|
||||
void MMU::unallocate_range(uintptr_t address, ptrdiff_t size)
|
||||
{
|
||||
uintptr_t s_page = address & PAGE_MASK;
|
||||
uintptr_t e_page = (address + size - 1) & PAGE_MASK;
|
||||
for (uintptr_t page = s_page; page <= e_page; page += PAGE_SIZE)
|
||||
UnAllocatePage(page);
|
||||
unallocate_page(page);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user