1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:58:11 +00:00

Everywhere: Replace a bundle of dbg with dbgln.

These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
This commit is contained in:
asynts 2021-01-15 00:18:55 +01:00 committed by Andreas Kling
parent a348ab55b0
commit 7b0a1a98d9
12 changed files with 81 additions and 71 deletions

View file

@ -27,13 +27,12 @@
#include "MasterPTY.h"
#include "PTYMultiplexer.h"
#include "SlavePTY.h"
#include <AK/Debug.h>
#include <Kernel/Process.h>
#include <LibC/errno_numbers.h>
#include <LibC/signal_numbers.h>
#include <LibC/sys/ioctl_numbers.h>
//#define MASTERPTY_DEBUG
namespace Kernel {
MasterPTY::MasterPTY(unsigned index)
@ -54,9 +53,7 @@ MasterPTY::MasterPTY(unsigned index)
MasterPTY::~MasterPTY()
{
#ifdef MASTERPTY_DEBUG
dbg() << "~MasterPTY(" << m_index << ")";
#endif
dbgln<debug_masterpty>("~MasterPTY({})", m_index);
PTYMultiplexer::the().notify_master_destroyed({}, m_index);
}
@ -94,9 +91,7 @@ bool MasterPTY::can_write(const FileDescription&, size_t) const
void MasterPTY::notify_slave_closed(Badge<SlavePTY>)
{
#ifdef MASTERPTY_DEBUG
dbg() << "MasterPTY(" << m_index << "): slave closed, my retains: " << ref_count() << ", slave retains: " << m_slave->ref_count();
#endif
dbgln<debug_masterpty>("MasterPTY({}): slave closed, my retains: {}, slave retains: {}", m_index, ref_count(), m_slave->ref_count());
// +1 ref for my MasterPTY::m_slave
// +1 ref for FileDescription::m_device
if (m_slave->ref_count() == 2)