瀏覽代碼

Kernel: Add a comment about what the MM lock protects

Andreas Kling 2 年之前
父節點
當前提交
c14dda14c4
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      Kernel/Memory/MemoryManager.cpp

+ 5 - 0
Kernel/Memory/MemoryManager.cpp

@@ -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()