mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:37:35 +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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue