summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-12-03 01:38:22 +0100
committerAndreas Kling <awesomekling@gmail.com>2018-12-03 01:38:22 +0100
commitaff89d2fd7c8653b29adb06d19fcc857f886a866 (patch)
tree8e1cd01d7af7f81f2d2b9352dd750adc8847b4d3 /Kernel
parentf31e1ceab06145c8280d21fa3818e6d9cd98e47f (diff)
downloadserenity-aff89d2fd7c8653b29adb06d19fcc857f886a866.zip
Yet more coding style fixes.
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/Console.cpp4
-rw-r--r--Kernel/Console.h2
-rw-r--r--Kernel/IDEDiskDevice.cpp6
-rw-r--r--Kernel/IDEDiskDevice.h6
-rw-r--r--Kernel/MemoryManager.cpp182
-rw-r--r--Kernel/MemoryManager.h52
-rw-r--r--Kernel/Process.cpp14
-rw-r--r--Kernel/Syscall.cpp2
8 files changed, 133 insertions, 135 deletions
diff --git a/Kernel/Console.cpp b/Kernel/Console.cpp
index 32005a3381..30fc4cd2fb 100644
--- a/Kernel/Console.cpp
+++ b/Kernel/Console.cpp
@@ -42,11 +42,11 @@ ssize_t Console::write(const byte* data, size_t size)
if (!m_implementation)
return 0;
for (size_t i = 0; i < size; ++i)
- putChar(data[i]);
+ put_char(data[i]);
return size;
}
-void Console::putChar(char ch)
+void Console::put_char(char ch)
{
#ifdef CONSOLE_OUT_TO_E9
//if (ch != 27)
diff --git a/Kernel/Console.h b/Kernel/Console.h
index f349b82617..74fbaedbec 100644
--- a/Kernel/Console.h
+++ b/Kernel/Console.h
@@ -24,7 +24,7 @@ public:
void setImplementation(ConsoleImplementation* implementation) { m_implementation = implementation; }
- void putChar(char);
+ void put_char(char);
private:
ConsoleImplementation* m_implementation { nullptr };
diff --git a/Kernel/IDEDiskDevice.cpp b/Kernel/IDEDiskDevice.cpp
index e06fea4978..1e3a0257dd 100644
--- a/Kernel/IDEDiskDevice.cpp
+++ b/Kernel/IDEDiskDevice.cpp
@@ -52,18 +52,18 @@ const char* IDEDiskDevice::class_name() const
return "IDEDiskDevice";
}
-unsigned IDEDiskDevice::blockSize() const
+unsigned IDEDiskDevice::block_size() const
{
return 512;
}
-bool IDEDiskDevice::readBlock(unsigned index, byte* out) const
+bool IDEDiskDevice::read_block(unsigned index, byte* out) const
{
const_cast<IDEDiskDevice&>(*this).read_sectors(index, 1, out);
return true;
}
-bool IDEDiskDevice::writeBlock(unsigned index, const byte* data)
+bool IDEDiskDevice::write_block(unsigned index, const byte* data)
{
write_sectors(index, 1, data);
return true;
diff --git a/Kernel/IDEDiskDevice.h b/Kernel/IDEDiskDevice.h
index 8e627d2008..1a70ba995b 100644
--- a/Kernel/IDEDiskDevice.h
+++ b/Kernel/IDEDiskDevice.h
@@ -11,9 +11,9 @@ public:
virtual ~IDEDiskDevice() override;
// ^DiskDevice
- virtual unsigned blockSize() const override;
- virtual bool readBlock(unsigned index, byte*) const override;
- virtual bool writeBlock(unsigned index, const byte*) override;
+ virtual unsigned block_size() const override;
+ virtual bool read_block(unsigned index, byte*) const override;
+ virtual bool write_block(unsigned index, const byte*) override;
protected:
IDEDiskDevice();
diff --git a/Kernel/MemoryManager.cpp b/Kernel/MemoryManager.cpp
index a81b6767c3..65e8550870 100644
--- a/Kernel/MemoryManager.cpp
+++ b/Kernel/MemoryManager.cpp
@@ -21,12 +21,12 @@ MemoryManager& MM
MemoryManager::MemoryManager()
{
m_kernel_page_directory = (PageDirectory*)0x4000;
- m_pageTableZero = (dword*)0x6000;
- m_pageTableOne = (dword*)0x7000;
+ m_page_table_zero = (dword*)0x6000;
+ m_page_table_one = (dword*)0x7000;
m_next_laddr.set(0xd0000000);
- initializePaging();
+ initialize_paging();
}
MemoryManager::~MemoryManager()
@@ -60,12 +60,12 @@ void MemoryManager::release_page_directory(PageDirectory& page_directory)
#endif
}
-void MemoryManager::initializePaging()
+void MemoryManager::initialize_paging()
{
static_assert(sizeof(MemoryManager::PageDirectoryEntry) == 4);
static_assert(sizeof(MemoryManager::PageTableEntry) == 4);
- memset(m_pageTableZero, 0, PAGE_SIZE);
- memset(m_pageTableOne, 0, PAGE_SIZE);
+ memset(m_page_table_zero, 0, PAGE_SIZE);
+ memset(m_page_table_one, 0, PAGE_SIZE);
memset(m_kernel_page_directory, 0, sizeof(PageDirectory));
#ifdef MM_DEBUG
@@ -73,7 +73,7 @@ void MemoryManager::initializePaging()
#endif
// Make null dereferences crash.
- protectMap(LinearAddress(0), PAGE_SIZE);
+ map_protected(LinearAddress(0), PAGE_SIZE);
// The bottom 4 MB are identity mapped & supervisor only. Every process shares these mappings.
create_identity_mapping(LinearAddress(PAGE_SIZE), 4 * MB);
@@ -123,38 +123,38 @@ void MemoryManager::remove_identity_mapping(LinearAddress laddr, size_t size)
// FIXME: ASSERT(laddr is 4KB aligned);
for (dword offset = 0; offset < size; offset += PAGE_SIZE) {
auto pte_address = laddr.offset(offset);
- auto pte = ensurePTE(m_kernel_page_directory, pte_address);
- pte.setPhysicalPageBase(0);
- pte.setUserAllowed(false);
- pte.setPresent(true);
- pte.setWritable(true);
- flushTLB(pte_address);
+ auto pte = ensure_pte(m_kernel_page_directory, pte_address);
+ pte.set_physical_page_base(0);
+ pte.set_user_allowed(false);
+ pte.set_present(true);
+ pte.set_writable(true);
+ flush_tlb(pte_address);
}
}
-auto MemoryManager::ensurePTE(PageDirectory* page_directory, LinearAddress laddr) -> PageTableEntry
+auto MemoryManager::ensure_pte(PageDirectory* page_directory, LinearAddress laddr) -> PageTableEntry
{
ASSERT_INTERRUPTS_DISABLED();
dword page_directory_index = (laddr.get() >> 22) & 0x3ff;
dword page_table_index = (laddr.get() >> 12) & 0x3ff;
PageDirectoryEntry pde = PageDirectoryEntry(&page_directory->entries[page_directory_index]);
- if (!pde.isPresent()) {
+ if (!pde.is_present()) {
#ifdef MM_DEBUG
dbgprintf("MM: PDE %u not present, allocating\n", page_directory_index);
#endif
if (page_directory_index == 0) {
ASSERT(page_directory == m_kernel_page_directory);
- pde.setPageTableBase((dword)m_pageTableZero);
- pde.setUserAllowed(false);
- pde.setPresent(true);
- pde.setWritable(true);
+ pde.setPageTableBase((dword)m_page_table_zero);
+ pde.set_user_allowed(false);
+ pde.set_present(true);
+ pde.set_writable(true);
} else if (page_directory_index == 1) {
ASSERT(page_directory == m_kernel_page_directory);
- pde.setPageTableBase((dword)m_pageTableOne);
- pde.setUserAllowed(false);
- pde.setPresent(true);
- pde.setWritable(true);
+ pde.setPageTableBase((dword)m_page_table_one);
+ pde.set_user_allowed(false);
+ pde.set_present(true);
+ pde.set_writable(true);
} else {
auto page_table = allocate_page_table(*page_directory, page_directory_index);
#ifdef MM_DEBUG
@@ -167,27 +167,27 @@ auto MemoryManager::ensurePTE(PageDirectory* page_directory, LinearAddress laddr
#endif
pde.setPageTableBase(page_table->paddr().get());
- pde.setUserAllowed(true);
- pde.setPresent(true);
- pde.setWritable(true);
+ pde.set_user_allowed(true);
+ pde.set_present(true);
+ pde.set_writable(true);
page_directory->physical_pages[page_directory_index] = move(page_table);
}
}
return PageTableEntry(&pde.pageTableBase()[page_table_index]);
}
-void MemoryManager::protectMap(LinearAddress linearAddress, size_t length)
+void MemoryManager::map_protected(LinearAddress linearAddress, size_t length)
{
InterruptDisabler disabler;
// FIXME: ASSERT(linearAddress is 4KB aligned);
for (dword offset = 0; offset < length; offset += PAGE_SIZE) {
auto pteAddress = linearAddress.offset(offset);
- auto pte = ensurePTE(m_kernel_page_directory, pteAddress);
- pte.setPhysicalPageBase(pteAddress.get());
- pte.setUserAllowed(false);
- pte.setPresent(false);
- pte.setWritable(false);
- flushTLB(pteAddress);
+ auto pte = ensure_pte(m_kernel_page_directory, pteAddress);
+ pte.set_physical_page_base(pteAddress.get());
+ pte.set_user_allowed(false);
+ pte.set_present(false);
+ pte.set_writable(false);
+ flush_tlb(pteAddress);
}
}
@@ -197,12 +197,12 @@ void MemoryManager::create_identity_mapping(LinearAddress laddr, size_t size)
// FIXME: ASSERT(laddr is 4KB aligned);
for (dword offset = 0; offset < size; offset += PAGE_SIZE) {
auto pteAddress = laddr.offset(offset);
- auto pte = ensurePTE(m_kernel_page_directory, pteAddress);
- pte.setPhysicalPageBase(pteAddress.get());
- pte.setUserAllowed(false);
- pte.setPresent(true);
- pte.setWritable(true);
- flushTLB(pteAddress);
+ auto pte = ensure_pte(m_kernel_page_directory, pteAddress);
+ pte.set_physical_page_base(pteAddress.get());
+ pte.set_user_allowed(false);
+ pte.set_present(true);
+ pte.set_writable(true);
+ flush_tlb(pteAddress);
}
}
@@ -389,7 +389,7 @@ void MemoryManager::enter_process_paging_scope(Process& process)
asm volatile("movl %%eax, %%cr3"::"a"(process.m_page_directory):"memory");
}
-void MemoryManager::flushEntireTLB()
+void MemoryManager::flush_entire_tlb()
{
asm volatile(
"mov %cr3, %eax\n"
@@ -397,7 +397,7 @@ void MemoryManager::flushEntireTLB()
);
}
-void MemoryManager::flushTLB(LinearAddress laddr)
+void MemoryManager::flush_tlb(LinearAddress laddr)
{
asm volatile("invlpg %0": :"m" (*(char*)laddr.get()) : "memory");
}
@@ -406,12 +406,12 @@ byte* MemoryManager::quickmap_page(PhysicalPage& physical_page)
{
ASSERT_INTERRUPTS_DISABLED();
auto page_laddr = LinearAddress(4 * MB);
- auto pte = ensurePTE(m_kernel_page_directory, page_laddr);
- pte.setPhysicalPageBase(physical_page.paddr().get());
- pte.setPresent(true); // FIXME: Maybe we should use the is_readable flag here?
- pte.setWritable(true);
- pte.setUserAllowed(false);
- flushTLB(page_laddr);
+ auto pte = ensure_pte(m_kernel_page_directory, page_laddr);
+ pte.set_physical_page_base(physical_page.paddr().get());
+ pte.set_present(true); // FIXME: Maybe we should use the is_readable flag here?
+ pte.set_writable(true);
+ pte.set_user_allowed(false);
+ flush_tlb(page_laddr);
#ifdef MM_DEBUG
dbgprintf("MM: >> quickmap_page L%x => P%x\n", page_laddr, physical_page.paddr().get());
#endif
@@ -422,15 +422,15 @@ void MemoryManager::unquickmap_page()
{
ASSERT_INTERRUPTS_DISABLED();
auto page_laddr = LinearAddress(4 * MB);
- auto pte = ensurePTE(m_kernel_page_directory, page_laddr);
+ auto pte = ensure_pte(m_kernel_page_directory, page_laddr);
#ifdef MM_DEBUG
auto old_physical_address = pte.physicalPageBase();
#endif
- pte.setPhysicalPageBase(0);
- pte.setPresent(false);
- pte.setWritable(false);
- pte.setUserAllowed(false);
- flushTLB(page_laddr);
+ pte.set_physical_page_base(0);
+ pte.set_present(false);
+ pte.set_writable(false);
+ pte.set_user_allowed(false);
+ flush_tlb(page_laddr);
#ifdef MM_DEBUG
dbgprintf("MM: >> unquickmap_page L%x =/> P%x\n", page_laddr, old_physical_address);
#endif
@@ -440,18 +440,18 @@ void MemoryManager::remap_region_page(PageDirectory* page_directory, Region& reg
{
InterruptDisabler disabler;
auto page_laddr = region.linearAddress.offset(page_index_in_region * PAGE_SIZE);
- auto pte = ensurePTE(page_directory, page_laddr);
+ auto pte = ensure_pte(page_directory, page_laddr);
auto& physical_page = region.vmo().physical_pages()[page_index_in_region];
ASSERT(physical_page);
- pte.setPhysicalPageBase(physical_page->paddr().get());
- pte.setPresent(true); // FIXME: Maybe we should use the is_readable flag here?
+ pte.set_physical_page_base(physical_page->paddr().get());
+ pte.set_present(true); // FIXME: Maybe we should use the is_readable flag here?
if (region.cow_map.get(page_index_in_region))
- pte.setWritable(false);
+ pte.set_writable(false);
else
- pte.setWritable(region.is_writable);
- pte.setUserAllowed(user_allowed);
+ pte.set_writable(region.is_writable);
+ pte.set_user_allowed(user_allowed);
if (page_directory->is_active())
- flushTLB(page_laddr);
+ flush_tlb(page_laddr);
#ifdef MM_DEBUG
dbgprintf("MM: >> remap_region_page (PD=%x) '%s' L%x => P%x (@%p)\n", page_directory, region.name.characters(), page_laddr.get(), physical_page->paddr().get(), physical_page.ptr());
#endif
@@ -472,23 +472,23 @@ void MemoryManager::map_region_at_address(PageDirectory* page_directory, Region&
#endif
for (size_t i = region.first_page_index(); i <= region.last_page_index(); ++i) {
auto page_laddr = laddr.offset(i * PAGE_SIZE);
- auto pte = ensurePTE(page_directory, page_laddr);
+ auto pte = ensure_pte(page_directory, page_laddr);
auto& physical_page = vmo.physical_pages()[i];
if (physical_page) {
- pte.setPhysicalPageBase(physical_page->paddr().get());
- pte.setPresent(true); // FIXME: Maybe we should use the is_readable flag here?
+ pte.set_physical_page_base(physical_page->paddr().get());
+ pte.set_present(true); // FIXME: Maybe we should use the is_readable flag here?
if (region.cow_map.get(i))
- pte.setWritable(false);
+ pte.set_writable(false);
else
- pte.setWritable(region.is_writable);
+ pte.set_writable(region.is_writable);
} else {
- pte.setPhysicalPageBase(0);
- pte.setPresent(false);
- pte.setWritable(region.is_writable);
+ pte.set_physical_page_base(0);
+ pte.set_present(false);
+ pte.set_writable(region.is_writable);
}
- pte.setUserAllowed(user_allowed);
+ pte.set_user_allowed(user_allowed);
if (page_directory->is_active())
- flushTLB(page_laddr);
+ flush_tlb(page_laddr);
#ifdef MM_DEBUG
dbgprintf("MM: >> map_region_at_address (PD=%x) '%s' L%x => P%x (@%p)\n", page_directory, region.name.characters(), page_laddr, physical_page ? physical_page->paddr().get() : 0, physical_page.ptr());
#endif
@@ -503,13 +503,13 @@ void MemoryManager::unmap_range(PageDirectory* page_directory, LinearAddress lad
size_t numPages = size / PAGE_SIZE;
for (size_t i = 0; i < numPages; ++i) {
auto page_laddr = laddr.offset(i * PAGE_SIZE);
- auto pte = ensurePTE(page_directory, page_laddr);
- pte.setPhysicalPageBase(0);
- pte.setPresent(false);
- pte.setWritable(false);
- pte.setUserAllowed(false);
+ auto pte = ensure_pte(page_directory, page_laddr);
+ pte.set_physical_page_base(0);
+ pte.set_present(false);
+ pte.set_writable(false);
+ pte.set_user_allowed(false);
if (page_directory->is_active())
- flushTLB(page_laddr);
+ flush_tlb(page_laddr);
#ifdef MM_DEBUG
dbgprintf("MM: << unmap_range L%x =/> 0\n", page_laddr);
#endif
@@ -548,18 +548,18 @@ void MemoryManager::remove_kernel_alias_for_region(Region& region, byte* addr)
unmap_range(m_kernel_page_directory, LinearAddress((dword)addr), region.size);
}
-bool MemoryManager::unmapRegion(Process& process, Region& region)
+bool MemoryManager::unmap_region(Process& process, Region& region)
{
InterruptDisabler disabler;
for (size_t i = 0; i < region.page_count(); ++i) {
auto laddr = region.linearAddress.offset(i * PAGE_SIZE);
- auto pte = ensurePTE(process.m_page_directory, laddr);
- pte.setPhysicalPageBase(0);
- pte.setPresent(false);
- pte.setWritable(false);
- pte.setUserAllowed(false);
+ auto pte = ensure_pte(process.m_page_directory, laddr);
+ pte.set_physical_page_base(0);
+ pte.set_present(false);
+ pte.set_writable(false);
+ pte.set_user_allowed(false);
if (process.m_page_directory->is_active())
- flushTLB(laddr);
+ flush_tlb(laddr);
#ifdef MM_DEBUG
auto& physical_page = region.vmo().physical_pages()[region.first_page_index() + i];
dbgprintf("MM: >> Unmapped L%x => P%x <<\n", laddr, physical_page ? physical_page->paddr().get() : 0);
@@ -568,7 +568,7 @@ bool MemoryManager::unmapRegion(Process& process, Region& region)
return true;
}
-bool MemoryManager::mapRegion(Process& process, Region& region)
+bool MemoryManager::map_region(Process& process, Region& region)
{
map_region_at_address(process.m_page_directory, region, region.linearAddress, true);
return true;
@@ -579,12 +579,12 @@ bool MemoryManager::validate_user_read(const Process& process, LinearAddress lad
dword pageDirectoryIndex = (laddr.get() >> 22) & 0x3ff;
dword pageTableIndex = (laddr.get() >> 12) & 0x3ff;
auto pde = PageDirectoryEntry(&process.m_page_directory->entries[pageDirectoryIndex]);
- if (!pde.isPresent())
+ if (!pde.is_present())
return false;
auto pte = PageTableEntry(&pde.pageTableBase()[pageTableIndex]);
- if (!pte.isPresent())
+ if (!pte.is_present())
return false;
- if (!pte.isUserAllowed())
+ if (!pte.is_user_allowed())
return false;
return true;
}
@@ -594,14 +594,14 @@ bool MemoryManager::validate_user_write(const Process& process, LinearAddress la
dword pageDirectoryIndex = (laddr.get() >> 22) & 0x3ff;
dword pageTableIndex = (laddr.get() >> 12) & 0x3ff;
auto pde = PageDirectoryEntry(&process.m_page_directory->entries[pageDirectoryIndex]);
- if (!pde.isPresent())
+ if (!pde.is_present())
return false;
auto pte = PageTableEntry(&pde.pageTableBase()[pageTableIndex]);
- if (!pte.isPresent())
+ if (!pte.is_present())
return false;
- if (!pte.isUserAllowed())
+ if (!pte.is_user_allowed())
return false;
- if (!pte.isWritable())
+ if (!pte.is_writable())
return false;
return true;
}
diff --git a/Kernel/MemoryManager.h b/Kernel/MemoryManager.h
index d68a458d01..03bb3bbcfe 100644
--- a/Kernel/MemoryManager.h
+++ b/Kernel/MemoryManager.h
@@ -156,14 +156,12 @@ class MemoryManager {
public:
static MemoryManager& the() PURE;
- PhysicalAddress pageDirectoryBase() const { return PhysicalAddress(reinterpret_cast<dword>(m_kernel_page_directory)); }
-
static void initialize();
PageFaultResponse handle_page_fault(const PageFault&);
- bool mapRegion(Process&, Region&);
- bool unmapRegion(Process&, Region&);
+ bool map_region(Process&, Region&);
+ bool unmap_region(Process&, Region&);
void populate_page_directory(PageDirectory&);
void release_page_directory(PageDirectory&);
@@ -195,14 +193,14 @@ private:
void unmap_range(PageDirectory*, LinearAddress, size_t);
void remap_region_page(PageDirectory*, Region&, unsigned page_index_in_region, bool user_allowed);
- void initializePaging();
- void flushEntireTLB();
- void flushTLB(LinearAddress);
+ void initialize_paging();
+ void flush_entire_tlb();
+ void flush_tlb(LinearAddress);
RetainPtr<PhysicalPage> allocate_page_table(PageDirectory&, unsigned index);
void deallocate_page_table(PageDirectory&, unsigned index);
- void protectMap(LinearAddress, size_t length);
+ void map_protected(LinearAddress, size_t length);
void create_identity_mapping(LinearAddress, size_t length);
void remove_identity_mapping(LinearAddress, size_t);
@@ -235,16 +233,16 @@ private:
UserSupervisor = 1 << 2,
};
- bool isPresent() const { return raw() & Present; }
- void setPresent(bool b) { setBit(Present, b); }
+ bool is_present() const { return raw() & Present; }
+ void set_present(bool b) { set_bit(Present, b); }
- bool isUserAllowed() const { return raw() & UserSupervisor; }
- void setUserAllowed(bool b) { setBit(UserSupervisor, b); }
+ bool is_user_allowed() const { return raw() & UserSupervisor; }
+ void set_user_allowed(bool b) { set_bit(UserSupervisor, b); }
- bool isWritable() const { return raw() & ReadWrite; }
- void setWritable(bool b) { setBit(ReadWrite, b); }
+ bool is_writable() const { return raw() & ReadWrite; }
+ void set_writable(bool b) { set_bit(ReadWrite, b); }
- void setBit(byte bit, bool value)
+ void set_bit(byte bit, bool value)
{
if (value)
*m_pde |= bit;
@@ -258,8 +256,8 @@ private:
struct PageTableEntry {
explicit PageTableEntry(dword* pte) : m_pte(pte) { }
- dword* physicalPageBase() { return reinterpret_cast<dword*>(raw() & 0xfffff000u); }
- void setPhysicalPageBase(dword value)
+ dword* physical_page_base() { return reinterpret_cast<dword*>(raw() & 0xfffff000u); }
+ void set_physical_page_base(dword value)
{
*m_pte &= 0xfffu;
*m_pte |= value & 0xfffff000u;
@@ -274,16 +272,16 @@ private:
UserSupervisor = 1 << 2,
};
- bool isPresent() const { return raw() & Present; }
- void setPresent(bool b) { setBit(Present, b); }
+ bool is_present() const { return raw() & Present; }
+ void set_present(bool b) { set_bit(Present, b); }
- bool isUserAllowed() const { return raw() & UserSupervisor; }
- void setUserAllowed(bool b) { setBit(UserSupervisor, b); }
+ bool is_user_allowed() const { return raw() & UserSupervisor; }
+ void set_user_allowed(bool b) { set_bit(UserSupervisor, b); }
- bool isWritable() const { return raw() & ReadWrite; }
- void setWritable(bool b) { setBit(ReadWrite, b); }
+ bool is_writable() const { return raw() & ReadWrite; }
+ void set_writable(bool b) { set_bit(ReadWrite, b); }
- void setBit(byte bit, bool value)
+ void set_bit(byte bit, bool value)
{
if (value)
*m_pte |= bit;
@@ -294,11 +292,11 @@ private:
dword* m_pte;
};
- PageTableEntry ensurePTE(PageDirectory*, LinearAddress);
+ PageTableEntry ensure_pte(PageDirectory*, LinearAddress);
PageDirectory* m_kernel_page_directory;
- dword* m_pageTableZero;
- dword* m_pageTableOne;
+ dword* m_page_table_zero;
+ dword* m_page_table_one;
LinearAddress m_next_laddr;
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp
index 3a1db69a26..9ffa7ded49 100644
--- a/Kernel/Process.cpp
+++ b/Kernel/Process.cpp
@@ -76,7 +76,7 @@ Region* Process::allocate_region(LinearAddress laddr, size_t size, String&& name
m_regions.append(adopt(*new Region(laddr, size, move(name), is_readable, is_writable)));
if (commit)
m_regions.last()->commit(*this);
- MM.mapRegion(*this, *m_regions.last());
+ MM.map_region(*this, *m_regions.last());
return m_regions.last().ptr();
}
@@ -91,7 +91,7 @@ Region* Process::allocate_file_backed_region(LinearAddress laddr, size_t size, R
}
laddr.mask(0xfffff000);
m_regions.append(adopt(*new Region(laddr, size, move(vnode), move(name), is_readable, is_writable)));
- MM.mapRegion(*this, *m_regions.last());
+ MM.map_region(*this, *m_regions.last());
return m_regions.last().ptr();
}
@@ -107,7 +107,7 @@ Region* Process::allocate_region_with_vmo(LinearAddress laddr, size_t size, Reta
offset_in_vmo &= PAGE_MASK;
size = ceilDiv(size, PAGE_SIZE) * PAGE_SIZE;
m_regions.append(adopt(*new Region(laddr, size, move(vmo), offset_in_vmo, move(name), is_readable, is_writable)));
- MM.mapRegion(*this, *m_regions.last());
+ MM.map_region(*this, *m_regions.last());
return m_regions.last().ptr();
}
@@ -116,7 +116,7 @@ bool Process::deallocate_region(Region& region)
InterruptDisabler disabler;
for (size_t i = 0; i < m_regions.size(); ++i) {
if (m_regions[i].ptr() == &region) {
- MM.unmapRegion(*this, region);
+ MM.unmap_region(*this, region);
m_regions.remove(i);
return true;
}
@@ -231,7 +231,7 @@ Process* Process::fork(RegisterDump& regs)
#endif
auto cloned_region = region->clone();
child->m_regions.append(move(cloned_region));
- MM.mapRegion(*child, *child->m_regions.last());
+ MM.map_region(*child, *child->m_regions.last());
}
child->m_tss.eax = 0; // fork() returns 0 in the child :^)
@@ -510,7 +510,7 @@ int Process::sys$get_environment(char*** environ)
auto* region = allocate_region(LinearAddress(), PAGE_SIZE, "environ");
if (!region)
return -ENOMEM;
- MM.mapRegion(*this, *region);
+ MM.map_region(*this, *region);
char* envpage = (char*)region->linearAddress.get();
*environ = (char**)envpage;
char* bufptr = envpage + (sizeof(char*) * (m_initialEnvironment.size() + 1));
@@ -529,7 +529,7 @@ int Process::sys$get_arguments(int* argc, char*** argv)
auto* region = allocate_region(LinearAddress(), PAGE_SIZE, "argv");
if (!region)
return -ENOMEM;
- MM.mapRegion(*this, *region);
+ MM.map_region(*this, *region);
char* argpage = (char*)region->linearAddress.get();
*argc = m_arguments.size();
*argv = (char**)argpage;
diff --git a/Kernel/Syscall.cpp b/Kernel/Syscall.cpp
index d5864406c8..0d83459de1 100644
--- a/Kernel/Syscall.cpp
+++ b/Kernel/Syscall.cpp
@@ -52,7 +52,7 @@ static dword handle(RegisterDump& regs, dword function, dword arg1, dword arg2,
Scheduler::yield();
break;
case Syscall::SC_putch:
- Console::the().putChar(arg1 & 0xff);
+ Console::the().put_char(arg1 & 0xff);
break;
case Syscall::SC_sleep:
return current->sys$sleep((unsigned)arg1);