mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-12 02:30:30 +09:00
parent
527c8047fe
commit
f48feae0b2
Notes:
sideshowbarker
2024-07-19 03:23:13 +09:00
Author: https://github.com/tomuta
Commit: f48feae0b2
Pull-request: https://github.com/SerenityOS/serenity/pull/3229
Issue: https://github.com/SerenityOS/serenity/issues/3226
Reviewed-by: https://github.com/awesomekling
44 changed files with 184 additions and 146 deletions
|
@ -27,29 +27,33 @@
|
|||
#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 Console* s_the;
|
||||
static auto s_the = Kernel::make_singleton<Console>();
|
||||
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 != nullptr;
|
||||
return s_the.is_initialized();
|
||||
}
|
||||
|
||||
Console::Console()
|
||||
: CharacterDevice(5, 1)
|
||||
{
|
||||
s_the = this;
|
||||
}
|
||||
|
||||
Console::~Console()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue