kern: implement improved [new page tables are zero] invariant

This commit is contained in:
Michael Scire
2021-06-17 13:03:46 -07:00
parent 25305257d6
commit 4892ffae15
5 changed files with 33 additions and 12 deletions

View File

@@ -107,8 +107,11 @@ namespace ams::kern {
Node *Peek() const { return m_root; }
Node *Pop() {
Node *r = m_root;
m_root = m_root->m_next;
Node * const r = m_root;
m_root = r->m_next;
r->m_next = nullptr;
return r;
}
};