1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:27:35 +00:00

AK: Rename Retainable => RefCounted.

(And various related renames that go along with it.)
This commit is contained in:
Andreas Kling 2019-06-21 15:29:31 +02:00
parent ef1bfcb9d8
commit 77b9fa89dd
45 changed files with 118 additions and 118 deletions

View file

@ -61,11 +61,11 @@ bool MasterPTY::can_write(FileDescription&) const
void MasterPTY::notify_slave_closed(Badge<SlavePTY>)
{
#ifdef MASTERPTY_DEBUG
dbgprintf("MasterPTY(%u): slave closed, my retains: %u, slave retains: %u\n", m_index, retain_count(), m_slave->retain_count());
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
if (m_slave->retain_count() == 2)
if (m_slave->ref_count() == 2)
m_slave = nullptr;
}
@ -86,7 +86,7 @@ bool MasterPTY::can_write_from_slave() const
void MasterPTY::close()
{
if (retain_count() == 2) {
if (ref_count() == 2) {
InterruptDisabler disabler;
// After the closing FileDescription dies, slave is the only thing keeping me alive.
// From this point, let's consider ourselves closed.