Kernel: Add a comment about what the MM lock protects

This commit is contained in:
Andreas Kling 2022-08-18 17:36:54 +02:00
parent 75348bdfd3
commit c14dda14c4

View file

@ -58,6 +58,11 @@ ErrorOr<FlatPtr> page_round_up(FlatPtr x)
// run. If we do, then Singleton would get re-initialized, causing
// the memory manager to be initialized twice!
static MemoryManager* s_the;
// The MM lock protects:
// - all data members of MemoryManager
// - the quickmap mechanism
// - the PTE/PDE mapping mechanism
RecursiveSpinlock s_mm_lock { LockRank::MemoryManager };
MemoryManager& MemoryManager::the()