Kernel: Remove some unused code in the SharedBuffer class

This commit is contained in:
Andreas Kling 2021-01-16 22:41:07 +01:00
parent b818cf898e
commit 0571125dfe
Notes: sideshowbarker 2024-07-18 23:09:52 +09:00
2 changed files with 0 additions and 30 deletions

View File

@ -198,27 +198,4 @@ void SharedBuffer::seal()
}
}
auto SharedBuffer::set_volatile_all(bool is_volatile, bool& was_purged) -> SetVolatileError
{
was_purged = false;
auto pid = Process::current()->pid();
LOCKER(shared_buffers().lock());
for (size_t i = 0; i < m_refs.size(); ++i) {
auto& ref = m_refs[i];
if (ref.pid == pid) {
if (Region* region = ref.region.unsafe_ptr()) {
switch (region->set_volatile(region->vaddr(), region->size(), is_volatile, was_purged)) {
case Region::SetVolatileError::Success:
return SetVolatileError::Success;
case Region::SetVolatileError::NotPurgeable:
return SetVolatileError::NotPurgeable;
case Region::SetVolatileError::OutOfMemory:
return SetVolatileError::OutOfMemory;
}
}
}
}
return SetVolatileError::NotMapped;
}
}

View File

@ -71,13 +71,6 @@ public:
size_t size() const { return m_vmobject->size(); }
void destroy_if_unused();
void seal();
enum class SetVolatileError {
Success = 0,
NotPurgeable,
OutOfMemory,
NotMapped
};
SetVolatileError set_volatile_all(bool is_volatile, bool& was_purged);
AnonymousVMObject& vmobject() { return m_vmobject; }
const AnonymousVMObject& vmobject() const { return m_vmobject; }
int id() const { return m_shbuf_id; }