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

Kernel: Switch singletons to use new Singleton class

Fixes #3226
This commit is contained in:
Tom 2020-08-20 09:36:06 -06:00 committed by Andreas Kling
parent 527c8047fe
commit f48feae0b2
44 changed files with 184 additions and 146 deletions

View file

@ -28,6 +28,7 @@
#include <Kernel/Devices/PS2MouseDevice.h>
#include <Kernel/Devices/VMWareBackdoor.h>
#include <Kernel/IO.h>
#include <Kernel/Singleton.h>
namespace Kernel {
@ -56,13 +57,12 @@ namespace Kernel {
//#define PS2MOUSE_DEBUG
static PS2MouseDevice* s_the;
static auto s_the = make_singleton<PS2MouseDevice>();
PS2MouseDevice::PS2MouseDevice()
: IRQHandler(IRQ_MOUSE)
, CharacterDevice(10, 1)
{
s_the = this;
initialize();
}
@ -70,6 +70,11 @@ PS2MouseDevice::~PS2MouseDevice()
{
}
void PS2MouseDevice::create()
{
s_the.ensure_instance();
}
PS2MouseDevice& PS2MouseDevice::the()
{
return *s_the;