1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 22:57:44 +00:00

Revert "Kernel: Move Singleton class to AK"

This reverts commit f0906250a1.
This commit is contained in:
Andreas Kling 2020-08-22 16:34:49 +02:00
parent b0a24a83be
commit 8925ad3fa0
31 changed files with 71 additions and 87 deletions

View file

@ -25,11 +25,11 @@
*/
#include <AK/Checked.h>
#include <AK/Singleton.h>
#include <Kernel/Devices/BXVGADevice.h>
#include <Kernel/IO.h>
#include <Kernel/PCI/Access.h>
#include <Kernel/Process.h>
#include <Kernel/Singleton.h>
#include <Kernel/VM/AnonymousVMObject.h>
#include <Kernel/VM/MemoryManager.h>
#include <LibC/errno_numbers.h>
@ -57,7 +57,7 @@ namespace Kernel {
#define VBE_DISPI_ENABLED 0x01
#define VBE_DISPI_LFB_ENABLED 0x40
static auto s_the = AK::make_singleton<BXVGADevice>();
static auto s_the = make_singleton<BXVGADevice>();
void BXVGADevice::initialize()
{

View file

@ -24,14 +24,14 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <AK/Singleton.h>
#include <Kernel/Devices/Device.h>
#include <Kernel/FileSystem/InodeMetadata.h>
#include <Kernel/Singleton.h>
#include <LibC/errno_numbers.h>
namespace Kernel {
static auto s_all_devices = AK::make_singleton<HashMap<u32, Device*>>();
static auto s_all_devices = make_singleton<HashMap<u32, Device*>>();
HashMap<u32, Device*>& Device::all_devices()
{

View file

@ -26,12 +26,12 @@
#include <AK/Assertions.h>
#include <AK/ByteBuffer.h>
#include <AK/Singleton.h>
#include <AK/StringView.h>
#include <AK/Types.h>
#include <Kernel/Arch/i386/CPU.h>
#include <Kernel/Devices/KeyboardDevice.h>
#include <Kernel/IO.h>
#include <Kernel/Singleton.h>
#include <Kernel/TTY/VirtualConsole.h>
//#define KEYBOARD_DEBUG
@ -336,7 +336,7 @@ void KeyboardDevice::handle_irq(const RegisterState&)
}
}
static auto s_the = AK::make_singleton<KeyboardDevice>();
static auto s_the = make_singleton<KeyboardDevice>();
void KeyboardDevice::initialize()
{

View file

@ -25,12 +25,12 @@
*/
#include "NullDevice.h"
#include <AK/Singleton.h>
#include <AK/StdLibExtras.h>
#include <Kernel/Singleton.h>
namespace Kernel {
static auto s_the = AK::make_singleton<NullDevice>();
static auto s_the = make_singleton<NullDevice>();
void NullDevice::initialize()
{

View file

@ -25,13 +25,13 @@
*/
#include <AK/ByteBuffer.h>
#include <AK/Singleton.h>
#include <AK/StringView.h>
#include <Kernel/Devices/PATAChannel.h>
#include <Kernel/Devices/PATADiskDevice.h>
#include <Kernel/FileSystem/ProcFS.h>
#include <Kernel/IO.h>
#include <Kernel/Process.h>
#include <Kernel/Singleton.h>
#include <Kernel/VM/MemoryManager.h>
namespace Kernel {
@ -108,7 +108,7 @@ namespace Kernel {
#define PCI_Mass_Storage_Class 0x1
#define PCI_IDE_Controller_Subclass 0x1
static auto s_pata_lock = AK::make_singleton<Lock>();
static auto s_pata_lock = make_singleton<Lock>();
static Lock& s_lock()
{

View file

@ -25,10 +25,10 @@
*/
#include <AK/Memory.h>
#include <AK/Singleton.h>
#include <Kernel/Devices/PS2MouseDevice.h>
#include <Kernel/Devices/VMWareBackdoor.h>
#include <Kernel/IO.h>
#include <Kernel/Singleton.h>
namespace Kernel {
@ -57,7 +57,7 @@ namespace Kernel {
//#define PS2MOUSE_DEBUG
static auto s_the = AK::make_singleton<PS2MouseDevice>();
static auto s_the = make_singleton<PS2MouseDevice>();
PS2MouseDevice::PS2MouseDevice()
: IRQHandler(IRQ_MOUSE)

View file

@ -25,13 +25,13 @@
*/
#include <AK/Memory.h>
#include <AK/Singleton.h>
#include <AK/StringView.h>
#include <Kernel/Devices/SB16.h>
#include <Kernel/Thread.h>
#include <Kernel/VM/AnonymousVMObject.h>
#include <Kernel/VM/MemoryManager.h>
#include <Kernel/IO.h>
#include <Kernel/Singleton.h>
//#define SB16_DEBUG
@ -77,7 +77,7 @@ void SB16::set_sample_rate(uint16_t hz)
dsp_write((u8)hz);
}
static auto s_the = AK::make_singleton<SB16>();
static auto s_the = make_singleton<SB16>();
SB16::SB16()
: IRQHandler(SB16_DEFAULT_IRQ)

View file

@ -26,13 +26,13 @@
#include <AK/Assertions.h>
#include <AK/OwnPtr.h>
#include <AK/Singleton.h>
#include <AK/String.h>
#include <Kernel/Arch/i386/CPU.h>
#include <Kernel/CommandLine.h>
#include <Kernel/Devices/VMWareBackdoor.h>
#include <Kernel/API/MousePacket.h>
#include <Kernel/IO.h>
#include <Kernel/Singleton.h>
namespace Kernel {
@ -111,7 +111,7 @@ private:
OwnPtr<VMWareBackdoor> m_backdoor;
};
static auto s_vmware_backdoor = AK::make_singleton<VMWareBackdoorDetector>();
static auto s_vmware_backdoor = make_singleton<VMWareBackdoorDetector>();
VMWareBackdoor* VMWareBackdoor::the()
{