mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 10:07:44 +00:00
Kernel: Remove some unused code in the SharedBuffer class
This commit is contained in:
parent
b818cf898e
commit
0571125dfe
2 changed files with 0 additions and 30 deletions
|
@ -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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,13 +71,6 @@ public:
|
||||||
size_t size() const { return m_vmobject->size(); }
|
size_t size() const { return m_vmobject->size(); }
|
||||||
void destroy_if_unused();
|
void destroy_if_unused();
|
||||||
void seal();
|
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; }
|
AnonymousVMObject& vmobject() { return m_vmobject; }
|
||||||
const AnonymousVMObject& vmobject() const { return m_vmobject; }
|
const AnonymousVMObject& vmobject() const { return m_vmobject; }
|
||||||
int id() const { return m_shbuf_id; }
|
int id() const { return m_shbuf_id; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue