summaryrefslogtreecommitdiff
path: root/Kernel/VM/PurgeableVMObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/VM/PurgeableVMObject.cpp')
-rw-r--r--Kernel/VM/PurgeableVMObject.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/Kernel/VM/PurgeableVMObject.cpp b/Kernel/VM/PurgeableVMObject.cpp
index d06b27a901..f671f80817 100644
--- a/Kernel/VM/PurgeableVMObject.cpp
+++ b/Kernel/VM/PurgeableVMObject.cpp
@@ -29,6 +29,19 @@ NonnullRefPtr<VMObject> PurgeableVMObject::clone()
int PurgeableVMObject::purge()
{
LOCKER(m_paging_lock);
+ return purge_impl();
+}
+
+int PurgeableVMObject::purge_with_interrupts_disabled(Badge<MemoryManager>)
+{
+ ASSERT_INTERRUPTS_DISABLED();
+ if (m_paging_lock.is_locked())
+ return 0;
+ return purge_impl();
+}
+
+int PurgeableVMObject::purge_impl()
+{
if (!m_volatile)
return 0;
int purged_page_count = 0;