diff options
author | Andreas Kling <kling@serenityos.org> | 2020-08-22 17:53:34 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-22 18:01:59 +0200 |
commit | 2fd9e722647b0a9b90b0380b898c17787918b451 (patch) | |
tree | 812bea0de4c6d9ce8767ea3b7d0dc1a0a6eb331b /Kernel/TTY/PTYMultiplexer.cpp | |
parent | 0addcb45b83cc46382dc249619b0ae1f12c59dba (diff) | |
download | serenity-2fd9e722647b0a9b90b0380b898c17787918b451.zip |
Revert "Kernel: Switch singletons to use new Singleton class"
This reverts commit f48feae0b2a300992479abf0b2ded85e45ac6045.
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); |