1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 21:45:08 +00:00

Kernel+Userland: Remove sys$shbuf_allow_all() and userland wrappers

Nobody is using globally shared shbufs anymore, so let's remove them.
This commit is contained in:
Andreas Kling 2021-01-16 22:27:38 +01:00
parent 968c1fa00a
commit b818cf898e
13 changed files with 0 additions and 70 deletions

View file

@ -65,8 +65,6 @@ void SharedBuffer::sanity_check(const char* what)
bool SharedBuffer::is_shared_with(ProcessID peer_pid) const
{
LOCKER(shared_buffers().lock(), Lock::Mode::Shared);
if (m_global)
return true;
for (auto& ref : m_refs) {
if (ref.pid == peer_pid) {
return true;
@ -80,18 +78,6 @@ void* SharedBuffer::ref_for_process_and_get_address(Process& process)
{
LOCKER(shared_buffers().lock());
ASSERT(is_shared_with(process.pid()));
if (m_global) {
bool found = false;
for (auto& ref : m_refs) {
if (ref.pid == process.pid()) {
found = true;
break;
}
}
if (!found)
m_refs.append(Reference(process.pid()));
}
for (auto& ref : m_refs) {
if (ref.pid == process.pid()) {
if (!ref.region) {
@ -112,8 +98,6 @@ void* SharedBuffer::ref_for_process_and_get_address(Process& process)
void SharedBuffer::share_with(ProcessID peer_pid)
{
LOCKER(shared_buffers().lock());
if (m_global)
return;
for (auto& ref : m_refs) {
if (ref.pid == peer_pid) {
// don't increment the reference count yet; let them shbuf_get it first.