diff --git a/kernel/include/kernel/Memory/PageTableScope.h b/kernel/include/kernel/Memory/PageTableScope.h index 1bb6fdaa..62955801 100644 --- a/kernel/include/kernel/Memory/PageTableScope.h +++ b/kernel/include/kernel/Memory/PageTableScope.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include namespace Kernel @@ -10,7 +11,8 @@ namespace Kernel { public: PageTableScope(PageTable& page_table) - : m_old(PageTable::current()) + : m_guard(page_table) + , m_old(PageTable::current()) , m_temp(page_table) { if (&m_old != &m_temp) @@ -22,6 +24,7 @@ namespace Kernel m_old.load(); } private: + LockGuard m_guard; CriticalScope m_scope; PageTable& m_old; PageTable& m_temp;