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

Revert "Kernel: Switch singletons to use new Singleton class"

This reverts commit f48feae0b2.
This commit is contained in:
Andreas Kling 2020-08-22 17:53:34 +02:00
parent 0addcb45b8
commit 2fd9e72264
44 changed files with 146 additions and 184 deletions

View file

@ -27,33 +27,29 @@
#include <Kernel/Console.h>
#include <Kernel/IO.h>
#include <Kernel/kstdio.h>
#include <Kernel/Singleton.h>
#include <Kernel/SpinLock.h>
// Bytes output to 0xE9 end up on the Bochs console. It's very handy.
#define CONSOLE_OUT_TO_E9
static auto s_the = Kernel::make_singleton<Console>();
static Console* s_the;
static Kernel::SpinLock g_console_lock;
void Console::initialize()
{
s_the.ensure_instance();
}
Console& Console::the()
{
ASSERT(s_the);
return *s_the;
}
bool Console::is_initialized()
{
return s_the.is_initialized();
return s_the != nullptr;
}
Console::Console()
: CharacterDevice(5, 1)
{
s_the = this;
}
Console::~Console()