diff options
Diffstat (limited to 'Kernel/TTY/PTYMultiplexer.cpp')
-rw-r--r-- | Kernel/TTY/PTYMultiplexer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Kernel/TTY/PTYMultiplexer.cpp b/Kernel/TTY/PTYMultiplexer.cpp index 4f8d48806e..ccc0678e43 100644 --- a/Kernel/TTY/PTYMultiplexer.cpp +++ b/Kernel/TTY/PTYMultiplexer.cpp @@ -28,7 +28,6 @@ #include "MasterPTY.h" #include <Kernel/FileSystem/FileDescription.h> #include <Kernel/Process.h> -#include <Kernel/Singleton.h> #include <LibC/errno_numbers.h> //#define PTMX_DEBUG @@ -36,16 +35,18 @@ namespace Kernel { static const unsigned s_max_pty_pairs = 8; -static auto s_the = make_singleton<PTYMultiplexer>(); +static PTYMultiplexer* s_the; PTYMultiplexer& PTYMultiplexer::the() { + ASSERT(s_the); return *s_the; } PTYMultiplexer::PTYMultiplexer() : CharacterDevice(5, 2) { + s_the = this; m_freelist.ensure_capacity(s_max_pty_pairs); for (int i = s_max_pty_pairs; i > 0; --i) m_freelist.unchecked_append(i - 1); |