summaryrefslogtreecommitdiff
path: root/Kernel/SharedBuffer.h
diff options
context:
space:
mode:
authorShannon Booth <shannon.ml.booth@gmail.com>2020-05-16 13:01:34 +1200
committerAndreas Kling <kling@serenityos.org>2020-05-16 09:44:00 +0200
commit8c1b01e79b640252ef090f3cf4a2173569e19281 (patch)
treeb07312991ed4bac77e928ca05a75927258bd1b09 /Kernel/SharedBuffer.h
parentf7ae66cee395db5d8fd16398071bc2917124633e (diff)
downloadserenity-8c1b01e79b640252ef090f3cf4a2173569e19281.zip
Kernel: Tidy up SharedBuffer interface
Make is_shared_with() const and hide private members.
Diffstat (limited to 'Kernel/SharedBuffer.h')
-rw-r--r--Kernel/SharedBuffer.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Kernel/SharedBuffer.h b/Kernel/SharedBuffer.h
index 071b8247c3..b7fd269a77 100644
--- a/Kernel/SharedBuffer.h
+++ b/Kernel/SharedBuffer.h
@@ -64,7 +64,7 @@ public:
}
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 share_with(pid_t peer_pid);
void share_globally() { m_global = true; }
@@ -77,6 +77,7 @@ public:
const PurgeableVMObject& vmobject() const { return m_vmobject; }
int id() const { return m_shbuf_id; }
+private:
int m_shbuf_id { -1 };
bool m_writable { true };
bool m_global { false };