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

View File

@@ -97,7 +97,7 @@ namespace IDT
extern "C" void cpp_isr_handler(uint64_t isr, uint64_t error, const Registers* regs)
{
Kernel::Panic(
Kernel::panic(
"{} (error code: 0x{16H})\r\n"
"Register dump\r\n"
"rax=0x{16H}, rbx=0x{16H}, rcx=0x{16H}, rdx=0x{16H}\r\n"
@@ -118,7 +118,7 @@ namespace IDT
s_irq_handlers[irq]();
else
{
if (!InterruptController::Get().IsInService(irq))
if (!InterruptController::get().is_in_service(irq))
{
dprintln("spurious irq 0x{2H}", irq);
return;
@@ -126,7 +126,7 @@ namespace IDT
dprintln("no handler for irq 0x{2H}\n", irq);
}
InterruptController::Get().EOI(irq);
InterruptController::get().eoi(irq);
}
static void flush_idt()

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;
@@ -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);
}