mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 00:57:43 +00:00
Revert "Kernel: Make PhysicalPage not movable and use atomic ref counting"
This reverts commit a89ccd842b
.
This commit is contained in:
parent
23f335bcd7
commit
0db7e04c2e
5 changed files with 24 additions and 20 deletions
|
@ -42,14 +42,18 @@ PhysicalPage::PhysicalPage(PhysicalAddress paddr, bool supervisor, bool may_retu
|
|||
{
|
||||
}
|
||||
|
||||
void PhysicalPage::return_to_freelist() const
|
||||
void PhysicalPage::return_to_freelist() &&
|
||||
{
|
||||
ASSERT((paddr().get() & ~PAGE_MASK) == 0);
|
||||
|
||||
InterruptDisabler disabler;
|
||||
|
||||
m_ref_count = 1;
|
||||
|
||||
if (m_supervisor)
|
||||
MM.deallocate_supervisor_physical_page(*this);
|
||||
MM.deallocate_supervisor_physical_page(move(*this));
|
||||
else
|
||||
MM.deallocate_user_physical_page(*this);
|
||||
MM.deallocate_user_physical_page(move(*this));
|
||||
|
||||
#ifdef MM_DEBUG
|
||||
dbg() << "MM: P" << String::format("%x", m_paddr.get()) << " released to freelist";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue