mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 00:57:36 +00:00
Kernel: Tidy up SharedBuffer interface
Make is_shared_with() const and hide private members.
This commit is contained in:
parent
f7ae66cee3
commit
8c1b01e79b
2 changed files with 3 additions and 2 deletions
|
@ -54,7 +54,7 @@ void SharedBuffer::sanity_check(const char* what)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SharedBuffer::is_shared_with(pid_t peer_pid)
|
bool SharedBuffer::is_shared_with(pid_t peer_pid) const
|
||||||
{
|
{
|
||||||
LOCKER(shared_buffers().lock(), Lock::Mode::Shared);
|
LOCKER(shared_buffers().lock(), Lock::Mode::Shared);
|
||||||
if (m_global)
|
if (m_global)
|
||||||
|
|
|
@ -64,7 +64,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
void sanity_check(const char* what);
|
void sanity_check(const char* what);
|
||||||
bool is_shared_with(pid_t peer_pid);
|
bool is_shared_with(pid_t peer_pid) const;
|
||||||
void* ref_for_process_and_get_address(Process& process);
|
void* ref_for_process_and_get_address(Process& process);
|
||||||
void share_with(pid_t peer_pid);
|
void share_with(pid_t peer_pid);
|
||||||
void share_globally() { m_global = true; }
|
void share_globally() { m_global = true; }
|
||||||
|
@ -77,6 +77,7 @@ public:
|
||||||
const PurgeableVMObject& vmobject() const { return m_vmobject; }
|
const PurgeableVMObject& vmobject() const { return m_vmobject; }
|
||||||
int id() const { return m_shbuf_id; }
|
int id() const { return m_shbuf_id; }
|
||||||
|
|
||||||
|
private:
|
||||||
int m_shbuf_id { -1 };
|
int m_shbuf_id { -1 };
|
||||||
bool m_writable { true };
|
bool m_writable { true };
|
||||||
bool m_global { false };
|
bool m_global { false };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue