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:
2023-02-01 21:05:44 +02:00
parent 4faa662a59
commit 9b8de5025a
50 changed files with 737 additions and 709 deletions

View File

@@ -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;
@@ -70,7 +70,7 @@ MMU::MMU()
asm volatile("movl %0, %%cr3" :: "r"(m_highest_paging_struct));
}
void MMU::AllocatePage(uintptr_t address)
void MMU::allocate_page(uintptr_t address)
{
#if MMU_DEBUG_PRINT
dprintln("AllocatePage(0x{8H})", address & PAGE_MASK);
@@ -93,15 +93,15 @@ void MMU::AllocatePage(uintptr_t address)
asm volatile("invlpg (%0)" :: "r"(address & PAGE_MASK) : "memory");
}
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)
{
#if MMU_DEBUG_PRINT
dprintln("UnAllocatePage(0x{8H})", address & PAGE_MASK);
@@ -126,10 +126,10 @@ void MMU::UnAllocatePage(uintptr_t address)
asm volatile("invlpg (%0)" :: "r"(address & PAGE_MASK) : "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);
}