1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:17:44 +00:00

Revert "Kernel: Switch singletons to use new Singleton class"

This reverts commit f48feae0b2.
This commit is contained in:
Andreas Kling 2020-08-22 17:53:34 +02:00
parent 0addcb45b8
commit 2fd9e72264
44 changed files with 146 additions and 184 deletions

View file

@ -27,7 +27,6 @@
#include <AK/Memory.h>
#include <Kernel/Process.h>
#include <Kernel/Random.h>
#include <Kernel/Singleton.h>
#include <Kernel/Thread.h>
#include <Kernel/VM/MemoryManager.h>
#include <Kernel/VM/PageDirectory.h>
@ -38,12 +37,13 @@ static const FlatPtr userspace_range_base = 0x00800000;
static const FlatPtr userspace_range_ceiling = 0xbe000000;
static const FlatPtr kernelspace_range_base = 0xc0800000;
static auto s_cr3_map = make_singleton<HashMap<u32, PageDirectory*>>();
static HashMap<u32, PageDirectory*>& cr3_map()
{
ASSERT_INTERRUPTS_DISABLED();
return *s_cr3_map;
static HashMap<u32, PageDirectory*>* map;
if (!map)
map = new HashMap<u32, PageDirectory*>;
return *map;
}
RefPtr<PageDirectory> PageDirectory::find_by_cr3(u32 cr3)