From c26e3ce86b6a8d38b0c74a92620bc6d46088c954 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 21 Jun 2019 18:40:24 +0200 Subject: [PATCH] Change "retain" to "ref" in various comments. --- AK/AKString.h | 2 +- Kernel/Process.cpp | 4 ++-- Kernel/TTY/MasterPTY.cpp | 4 ++-- Servers/WindowServer/WSClientConnection.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/AK/AKString.h b/AK/AKString.h index 453a67dd35..d08e8997f5 100644 --- a/AK/AKString.h +++ b/AK/AKString.h @@ -17,7 +17,7 @@ namespace AK { // Note that StringImpl is an immutable object that cannot shrink or grow. // Its allocation size is snugly tailored to the specific string it contains. // Copying a String is very efficient, since the internal StringImpl is -// retainable and so copying only requires modifying the retain count. +// retainable and so copying only requires modifying the ref count. // // There are three main ways to construct a new String: // diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index 52ff29dcca..aa18ee1131 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -2031,9 +2031,9 @@ size_t Process::amount_resident() const size_t Process::amount_shared() const { // FIXME: This will double count if multiple regions use the same physical page. - // FIXME: It doesn't work at the moment, since it relies on PhysicalPage retain counts, + // FIXME: It doesn't work at the moment, since it relies on PhysicalPage ref counts, // and each PhysicalPage is only reffed by its VMObject. This needs to be refactored - // so that every Region contributes +1 retain to each of its PhysicalPages. + // so that every Region contributes +1 ref to each of its PhysicalPages. size_t amount = 0; for (auto& region : m_regions) { amount += region->amount_shared(); diff --git a/Kernel/TTY/MasterPTY.cpp b/Kernel/TTY/MasterPTY.cpp index 62502c2390..fa339786c9 100644 --- a/Kernel/TTY/MasterPTY.cpp +++ b/Kernel/TTY/MasterPTY.cpp @@ -63,8 +63,8 @@ void MasterPTY::notify_slave_closed(Badge) #ifdef MASTERPTY_DEBUG dbgprintf("MasterPTY(%u): slave closed, my retains: %u, slave retains: %u\n", m_index, ref_count(), m_slave->ref_count()); #endif - // +1 retain for my MasterPTY::m_slave - // +1 retain for FileDescription::m_device + // +1 ref for my MasterPTY::m_slave + // +1 ref for FileDescription::m_device if (m_slave->ref_count() == 2) m_slave = nullptr; } diff --git a/Servers/WindowServer/WSClientConnection.cpp b/Servers/WindowServer/WSClientConnection.cpp index 7b326a14e4..c112ebdd65 100644 --- a/Servers/WindowServer/WSClientConnection.cpp +++ b/Servers/WindowServer/WSClientConnection.cpp @@ -491,7 +491,7 @@ void WSClientConnection::handle_request(const WSAPIGetClipboardContentsRequest&) response.clipboard.contents_size = WSClipboard::the().size(); // FIXME: This is a workaround for the fact that SharedBuffers will go away if neither side is retaining them. - // After we respond to GetClipboardContents, we have to wait for the client to retain the buffer on his side. + // After we respond to GetClipboardContents, we have to wait for the client to ref the buffer on his side. m_last_sent_clipboard_content = move(shared_buffer); } post_message(response);