mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:07:45 +00:00
Kernel: Move Singleton class to AK
This commit is contained in:
parent
0e69ebbce4
commit
f0906250a1
31 changed files with 87 additions and 71 deletions
|
@ -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 = make_singleton<BXVGADevice>();
|
||||
static auto s_the = AK::make_singleton<BXVGADevice>();
|
||||
|
||||
void BXVGADevice::initialize()
|
||||
{
|
||||
|
|
|
@ -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 = make_singleton<HashMap<u32, Device*>>();
|
||||
static auto s_all_devices = AK::make_singleton<HashMap<u32, Device*>>();
|
||||
|
||||
HashMap<u32, Device*>& Device::all_devices()
|
||||
{
|
||||
|
|
|
@ -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 = make_singleton<KeyboardDevice>();
|
||||
static auto s_the = AK::make_singleton<KeyboardDevice>();
|
||||
|
||||
void KeyboardDevice::initialize()
|
||||
{
|
||||
|
|
|
@ -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 = make_singleton<NullDevice>();
|
||||
static auto s_the = AK::make_singleton<NullDevice>();
|
||||
|
||||
void NullDevice::initialize()
|
||||
{
|
||||
|
|
|
@ -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 = make_singleton<Lock>();
|
||||
static auto s_pata_lock = AK::make_singleton<Lock>();
|
||||
|
||||
static Lock& s_lock()
|
||||
{
|
||||
|
|
|
@ -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 = make_singleton<PS2MouseDevice>();
|
||||
static auto s_the = AK::make_singleton<PS2MouseDevice>();
|
||||
|
||||
PS2MouseDevice::PS2MouseDevice()
|
||||
: IRQHandler(IRQ_MOUSE)
|
||||
|
|
|
@ -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 = make_singleton<SB16>();
|
||||
static auto s_the = AK::make_singleton<SB16>();
|
||||
|
||||
SB16::SB16()
|
||||
: IRQHandler(SB16_DEFAULT_IRQ)
|
||||
|
|
|
@ -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 = make_singleton<VMWareBackdoorDetector>();
|
||||
static auto s_vmware_backdoor = AK::make_singleton<VMWareBackdoorDetector>();
|
||||
|
||||
VMWareBackdoor* VMWareBackdoor::the()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue