mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:57:35 +00:00
Kernel: Put a bunch of debug spam behind #ifdefs.
This commit is contained in:
parent
56f7b392c1
commit
44e1e7423f
5 changed files with 22 additions and 2 deletions
|
@ -3,6 +3,8 @@
|
|||
#include <Kernel/Process.h>
|
||||
#include <LibC/errno_numbers.h>
|
||||
|
||||
//#define PTMX_DEBUG
|
||||
|
||||
static const unsigned s_max_pty_pairs = 8;
|
||||
static PTYMultiplexer* s_the;
|
||||
|
||||
|
@ -33,7 +35,9 @@ KResultOr<Retained<FileDescriptor>> PTYMultiplexer::open(int options)
|
|||
return KResult(-EBUSY);
|
||||
auto master_index = m_freelist.take_last();
|
||||
auto master = adopt(*new MasterPTY(master_index));
|
||||
#ifdef PTMX_DEBUG
|
||||
dbgprintf("PTYMultiplexer::open: Vending master %u\n", master->index());
|
||||
#endif
|
||||
return VFS::the().open(move(master), options);
|
||||
}
|
||||
|
||||
|
@ -41,5 +45,7 @@ void PTYMultiplexer::notify_master_destroyed(Badge<MasterPTY>, unsigned index)
|
|||
{
|
||||
LOCKER(m_lock);
|
||||
m_freelist.append(index);
|
||||
#ifdef PTMX_DEBUG
|
||||
dbgprintf("PTYMultiplexer: %u added to freelist\n", index);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue