1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:08:12 +00:00

Kernel: Add a quickmap region for each processor

Threads need to be able to concurrently quickmap things.
This commit is contained in:
Tom 2020-06-28 16:04:35 -06:00 committed by Andreas Kling
parent d249b5df8f
commit 2a38cc9a12
5 changed files with 56 additions and 22 deletions

View file

@ -67,6 +67,10 @@ class SynthFSInode;
#define MM Kernel::MemoryManager::the()
struct MemoryManagerData {
SpinLock<u8> m_quickmap_in_use;
};
class MemoryManager {
AK_MAKE_ETERNAL
friend class PageDirectory;
@ -80,7 +84,12 @@ class MemoryManager {
public:
static MemoryManager& the();
static void initialize();
static void initialize(u32 cpu);
static inline MemoryManagerData& get_data()
{
return Processor::current().get_mm_data();
}
PageFaultResponse handle_page_fault(const PageFault&);
@ -204,8 +213,6 @@ private:
static RecursiveSpinLock s_lock;
bool m_quickmap_in_use { false };
RefPtr<PhysicalPage> m_low_pseudo_identity_mapping_pages[4];
};