Kernel: Rename MMU to PageTable

This is more descriptive name for what it actually represents
This commit is contained in:
Bananymous
2023-05-29 21:06:09 +03:00
parent fb17af4844
commit 5bb1f2a48c
21 changed files with 180 additions and 174 deletions

View File

@@ -0,0 +1,30 @@
#pragma once
#include <kernel/CriticalScope.h>
#include <kernel/Memory/PageTable.h>
namespace Kernel
{
class PageTableScope
{
public:
PageTableScope(PageTable& page_table)
: m_old(PageTable::current())
, m_temp(page_table)
{
if (&m_old != &m_temp)
m_temp.load();
}
~PageTableScope()
{
if (&m_old != &m_temp)
m_old.load();
}
private:
CriticalScope m_scope;
PageTable& m_old;
PageTable& m_temp;
};
}