diff --git a/AK/FlyString.cpp b/AK/FlyString.cpp index aa6a3e79cac..ecf3a31df88 100644 --- a/AK/FlyString.cpp +++ b/AK/FlyString.cpp @@ -24,7 +24,7 @@ struct FlyStringImplTraits : public Traits { } }; -static AK::Singleton> s_table; +static Singleton> s_table; static HashTable& fly_impls() { diff --git a/Kernel/ConsoleDevice.cpp b/Kernel/ConsoleDevice.cpp index f1454008f24..6ff530e2a8d 100644 --- a/Kernel/ConsoleDevice.cpp +++ b/Kernel/ConsoleDevice.cpp @@ -14,7 +14,7 @@ // Output bytes to kernel debug port 0xE9 (Bochs console). It's very handy. #define CONSOLE_OUT_TO_BOCHS_DEBUG_PORT -static AK::Singleton s_the; +static Singleton s_the; static Kernel::SpinLock g_console_lock; UNMAP_AFTER_INIT void ConsoleDevice::initialize() diff --git a/Kernel/Devices/Device.cpp b/Kernel/Devices/Device.cpp index 4d04e8e1119..55136ea5d52 100644 --- a/Kernel/Devices/Device.cpp +++ b/Kernel/Devices/Device.cpp @@ -10,7 +10,7 @@ namespace Kernel { -static AK::Singleton> s_all_devices; +static Singleton> s_all_devices; HashMap& Device::all_devices() { diff --git a/Kernel/Devices/HID/HIDManagement.cpp b/Kernel/Devices/HID/HIDManagement.cpp index 67c20730070..3461e3f7d60 100644 --- a/Kernel/Devices/HID/HIDManagement.cpp +++ b/Kernel/Devices/HID/HIDManagement.cpp @@ -14,7 +14,7 @@ namespace Kernel { Atomic g_caps_lock_remapped_to_ctrl; -static AK::Singleton s_the; +static Singleton s_the; // clang-format off static constexpr Keyboard::CharacterMapData DEFAULT_CHARACTER_MAP = diff --git a/Kernel/Devices/NullDevice.cpp b/Kernel/Devices/NullDevice.cpp index d0b915c2a5c..f7093c4bb83 100644 --- a/Kernel/Devices/NullDevice.cpp +++ b/Kernel/Devices/NullDevice.cpp @@ -10,7 +10,7 @@ namespace Kernel { -static AK::Singleton s_the; +static Singleton s_the; UNMAP_AFTER_INIT void NullDevice::initialize() { diff --git a/Kernel/Devices/SB16.cpp b/Kernel/Devices/SB16.cpp index c390c19082d..f3b7955dcd4 100644 --- a/Kernel/Devices/SB16.cpp +++ b/Kernel/Devices/SB16.cpp @@ -58,7 +58,7 @@ void SB16::set_sample_rate(uint16_t hz) dsp_write((u8)hz); } -static AK::Singleton s_the; +static Singleton s_the; UNMAP_AFTER_INIT SB16::SB16() : IRQHandler(SB16_DEFAULT_IRQ) diff --git a/Kernel/Devices/VMWareBackdoor.cpp b/Kernel/Devices/VMWareBackdoor.cpp index 17e61bed087..f4b31cb516f 100644 --- a/Kernel/Devices/VMWareBackdoor.cpp +++ b/Kernel/Devices/VMWareBackdoor.cpp @@ -86,7 +86,7 @@ private: OwnPtr m_backdoor; }; -static AK::Singleton s_vmware_backdoor; +static Singleton s_vmware_backdoor; VMWareBackdoor* VMWareBackdoor::the() { diff --git a/Kernel/FileSystem/DevPtsFS.cpp b/Kernel/FileSystem/DevPtsFS.cpp index 45ae20fcb4a..80fc2432113 100644 --- a/Kernel/FileSystem/DevPtsFS.cpp +++ b/Kernel/FileSystem/DevPtsFS.cpp @@ -25,7 +25,7 @@ DevPtsFS::~DevPtsFS() { } -static AK::Singleton> s_ptys; +static Singleton> s_ptys; bool DevPtsFS::initialize() { diff --git a/Kernel/FileSystem/FIFO.cpp b/Kernel/FileSystem/FIFO.cpp index ed1daea882f..95da205a4ea 100644 --- a/Kernel/FileSystem/FIFO.cpp +++ b/Kernel/FileSystem/FIFO.cpp @@ -17,7 +17,7 @@ namespace Kernel { -static AK::Singleton>> s_table; +static Singleton>> s_table; static ProtectedValue>& all_fifos() { diff --git a/Kernel/FileSystem/FileSystem.cpp b/Kernel/FileSystem/FileSystem.cpp index 74cb86accea..75247ef6478 100644 --- a/Kernel/FileSystem/FileSystem.cpp +++ b/Kernel/FileSystem/FileSystem.cpp @@ -16,7 +16,7 @@ namespace Kernel { static u32 s_lastFileSystemID; -static AK::Singleton> s_file_system_map; +static Singleton> s_file_system_map; static HashMap& all_file_systems() { diff --git a/Kernel/FileSystem/Inode.cpp b/Kernel/FileSystem/Inode.cpp index 9db65ef1dd5..2b0943a238c 100644 --- a/Kernel/FileSystem/Inode.cpp +++ b/Kernel/FileSystem/Inode.cpp @@ -23,7 +23,7 @@ namespace Kernel { static SpinLock s_all_inodes_lock; -static AK::Singleton s_list; +static Singleton s_list; static Inode::List& all_with_lock() { diff --git a/Kernel/FileSystem/ProcFS.cpp b/Kernel/FileSystem/ProcFS.cpp index 7edb4474070..bda413bdf72 100644 --- a/Kernel/FileSystem/ProcFS.cpp +++ b/Kernel/FileSystem/ProcFS.cpp @@ -18,7 +18,7 @@ namespace Kernel { -static AK::Singleton s_the; +static Singleton s_the; ProcFSComponentRegistry& ProcFSComponentRegistry::the() { diff --git a/Kernel/FileSystem/SysFS.cpp b/Kernel/FileSystem/SysFS.cpp index af0328b9679..677ba4baee6 100644 --- a/Kernel/FileSystem/SysFS.cpp +++ b/Kernel/FileSystem/SysFS.cpp @@ -11,7 +11,7 @@ namespace Kernel { -static AK::Singleton s_the; +static Singleton s_the; SysFSComponentRegistry& SysFSComponentRegistry::the() { diff --git a/Kernel/FileSystem/VirtualFileSystem.cpp b/Kernel/FileSystem/VirtualFileSystem.cpp index f2f69b0b1df..6e2d1acaf4c 100644 --- a/Kernel/FileSystem/VirtualFileSystem.cpp +++ b/Kernel/FileSystem/VirtualFileSystem.cpp @@ -21,7 +21,7 @@ namespace Kernel { -static AK::Singleton s_the; +static Singleton s_the; static constexpr int symlink_recursion_limit { 5 }; // FIXME: increase? static constexpr int root_mount_flags = MS_NODEV | MS_NOSUID | MS_RDONLY; diff --git a/Kernel/Graphics/GraphicsManagement.cpp b/Kernel/Graphics/GraphicsManagement.cpp index 5e5fd7df9d4..4981641920a 100644 --- a/Kernel/Graphics/GraphicsManagement.cpp +++ b/Kernel/Graphics/GraphicsManagement.cpp @@ -19,7 +19,7 @@ namespace Kernel { -static AK::Singleton s_the; +static Singleton s_the; GraphicsManagement& GraphicsManagement::the() { diff --git a/Kernel/Interrupts/APIC.cpp b/Kernel/Interrupts/APIC.cpp index b34f9b86f0c..9d21d5daa7d 100644 --- a/Kernel/Interrupts/APIC.cpp +++ b/Kernel/Interrupts/APIC.cpp @@ -54,7 +54,7 @@ namespace Kernel { -static AK::Singleton s_apic; +static Singleton s_apic; class APICIPIInterruptHandler final : public GenericInterruptHandler { public: diff --git a/Kernel/Memory/MemoryManager.cpp b/Kernel/Memory/MemoryManager.cpp index fd60716e36e..507ec3b00f8 100644 --- a/Kernel/Memory/MemoryManager.cpp +++ b/Kernel/Memory/MemoryManager.cpp @@ -42,9 +42,9 @@ __attribute__((section(".super_pages"))) static u8 super_pages[1 * MiB]; namespace Kernel::Memory { -// NOTE: We can NOT use AK::Singleton for this class, because +// NOTE: We can NOT use Singleton for this class, because // MemoryManager::initialize is called *before* global constructors are -// run. If we do, then AK::Singleton would get re-initialized, causing +// run. If we do, then Singleton would get re-initialized, causing // the memory manager to be initialized twice! static MemoryManager* s_the; RecursiveSpinLock s_mm_lock; diff --git a/Kernel/Memory/PageDirectory.cpp b/Kernel/Memory/PageDirectory.cpp index 4d8cf94e880..138e0faa724 100644 --- a/Kernel/Memory/PageDirectory.cpp +++ b/Kernel/Memory/PageDirectory.cpp @@ -17,7 +17,7 @@ extern u8 end_of_kernel_image[]; namespace Kernel::Memory { -static AK::Singleton> s_cr3_map; +static Singleton> s_cr3_map; static HashMap& cr3_map() { diff --git a/Kernel/Net/IPv4Socket.cpp b/Kernel/Net/IPv4Socket.cpp index d22ef9992d5..4ccabe70224 100644 --- a/Kernel/Net/IPv4Socket.cpp +++ b/Kernel/Net/IPv4Socket.cpp @@ -26,7 +26,7 @@ namespace Kernel { -static AK::Singleton>> s_table; +static Singleton>> s_table; using BlockFlags = Thread::FileDescriptionBlocker::BlockFlags; diff --git a/Kernel/Net/LocalSocket.cpp b/Kernel/Net/LocalSocket.cpp index 0656952ff2f..5e8dc330f5e 100644 --- a/Kernel/Net/LocalSocket.cpp +++ b/Kernel/Net/LocalSocket.cpp @@ -19,7 +19,7 @@ namespace Kernel { -static AK::Singleton> s_list; +static Singleton> s_list; static ProtectedValue& all_sockets() { diff --git a/Kernel/Net/NetworkingManagement.cpp b/Kernel/Net/NetworkingManagement.cpp index a01be93f82d..e1aada237e4 100644 --- a/Kernel/Net/NetworkingManagement.cpp +++ b/Kernel/Net/NetworkingManagement.cpp @@ -20,7 +20,7 @@ namespace Kernel { -static AK::Singleton s_the; +static Singleton s_the; NetworkingManagement& NetworkingManagement::the() { diff --git a/Kernel/Net/Routing.cpp b/Kernel/Net/Routing.cpp index 47793f528cc..e9f5e5111fc 100644 --- a/Kernel/Net/Routing.cpp +++ b/Kernel/Net/Routing.cpp @@ -16,7 +16,7 @@ namespace Kernel { -static AK::Singleton>> s_arp_table; +static Singleton>> s_arp_table; class ARPTableBlocker : public Thread::Blocker { public: @@ -80,7 +80,7 @@ protected: } }; -static AK::Singleton s_arp_table_block_condition; +static Singleton s_arp_table_block_condition; ARPTableBlocker::ARPTableBlocker(IPv4Address ip_addr, Optional& addr) : m_ip_addr(ip_addr) diff --git a/Kernel/Net/TCPSocket.cpp b/Kernel/Net/TCPSocket.cpp index c9af9da414e..c03e6315099 100644 --- a/Kernel/Net/TCPSocket.cpp +++ b/Kernel/Net/TCPSocket.cpp @@ -54,14 +54,14 @@ void TCPSocket::set_state(State new_state) evaluate_block_conditions(); } -static AK::Singleton>>> s_socket_closing; +static Singleton>>> s_socket_closing; ProtectedValue>>& TCPSocket::closing_sockets() { return *s_socket_closing; } -static AK::Singleton>> s_socket_tuples; +static Singleton>> s_socket_tuples; ProtectedValue>& TCPSocket::sockets_by_tuple() { @@ -512,7 +512,7 @@ KResult TCPSocket::close() return result; } -static AK::Singleton>> s_sockets_for_retransmit; +static Singleton>> s_sockets_for_retransmit; ProtectedValue>& TCPSocket::sockets_for_retransmit() { diff --git a/Kernel/Net/UDPSocket.cpp b/Kernel/Net/UDPSocket.cpp index ef5783137f6..fc6217ebf20 100644 --- a/Kernel/Net/UDPSocket.cpp +++ b/Kernel/Net/UDPSocket.cpp @@ -22,7 +22,7 @@ void UDPSocket::for_each(Function callback) }); } -static AK::Singleton>> s_map; +static Singleton>> s_map; ProtectedValue>& UDPSocket::sockets_by_port() { diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index 06c9d3475b9..33a24a5abcb 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -45,11 +45,11 @@ static void create_signal_trampoline(); RecursiveSpinLock g_profiling_lock; static Atomic next_pid; -static AK::Singleton> s_processes; +static Singleton> s_processes; READONLY_AFTER_INIT HashMap>* g_modules; READONLY_AFTER_INIT Memory::Region* g_signal_trampoline_region; -static AK::Singleton> s_hostname; +static Singleton> s_hostname; ProtectedValue& hostname() { diff --git a/Kernel/ProcessGroup.cpp b/Kernel/ProcessGroup.cpp index 8de61719a0c..0f90ffd4c09 100644 --- a/Kernel/ProcessGroup.cpp +++ b/Kernel/ProcessGroup.cpp @@ -10,7 +10,7 @@ namespace Kernel { -static AK::Singleton> s_process_groups; +static Singleton> s_process_groups; SpinLockProtectedValue& process_groups() { diff --git a/Kernel/Random.cpp b/Kernel/Random.cpp index 4323f55af3a..71955912e1e 100644 --- a/Kernel/Random.cpp +++ b/Kernel/Random.cpp @@ -16,7 +16,7 @@ namespace Kernel { -static AK::Singleton s_the; +static Singleton s_the; static Atomic s_next_random_value = 1; KernelRng& KernelRng::the() diff --git a/Kernel/Syscalls/futex.cpp b/Kernel/Syscalls/futex.cpp index 5ca6d4b42a3..808599477dc 100644 --- a/Kernel/Syscalls/futex.cpp +++ b/Kernel/Syscalls/futex.cpp @@ -12,7 +12,7 @@ namespace Kernel { static SpinLock g_global_futex_lock; -static AK::Singleton> g_global_futex_queues; +static Singleton> g_global_futex_queues; FutexQueue::FutexQueue(FlatPtr user_address_or_offset, Memory::VMObject* vmobject) : m_user_address_or_offset(user_address_or_offset) diff --git a/Kernel/TTY/ConsoleManagement.cpp b/Kernel/TTY/ConsoleManagement.cpp index 01dbb46aa56..93156070004 100644 --- a/Kernel/TTY/ConsoleManagement.cpp +++ b/Kernel/TTY/ConsoleManagement.cpp @@ -14,7 +14,7 @@ namespace Kernel { -static AK::Singleton s_the; +static Singleton s_the; void ConsoleManagement::resolution_was_changed() { diff --git a/Kernel/TTY/PTYMultiplexer.cpp b/Kernel/TTY/PTYMultiplexer.cpp index 4dce9e97645..d786d744623 100644 --- a/Kernel/TTY/PTYMultiplexer.cpp +++ b/Kernel/TTY/PTYMultiplexer.cpp @@ -14,7 +14,7 @@ namespace Kernel { -static AK::Singleton s_the; +static Singleton s_the; PTYMultiplexer& PTYMultiplexer::the() { diff --git a/Kernel/Time/TimeManagement.cpp b/Kernel/Time/TimeManagement.cpp index d0ca68a76e5..b7a56a6f8e8 100644 --- a/Kernel/Time/TimeManagement.cpp +++ b/Kernel/Time/TimeManagement.cpp @@ -25,7 +25,7 @@ namespace Kernel { -static AK::Singleton s_the; +static Singleton s_the; TimeManagement& TimeManagement::the() { diff --git a/Kernel/TimerQueue.cpp b/Kernel/TimerQueue.cpp index 9f3214bf68e..ffa04fa4811 100644 --- a/Kernel/TimerQueue.cpp +++ b/Kernel/TimerQueue.cpp @@ -13,7 +13,7 @@ namespace Kernel { -static AK::Singleton s_the; +static Singleton s_the; static SpinLock g_timerqueue_lock; Time Timer::remaining() const diff --git a/Userland/Libraries/LibCore/EventLoop.cpp b/Userland/Libraries/LibCore/EventLoop.cpp index 886f5c8ab2a..ed7611dd65b 100644 --- a/Userland/Libraries/LibCore/EventLoop.cpp +++ b/Userland/Libraries/LibCore/EventLoop.cpp @@ -109,7 +109,7 @@ struct SignalHandlersInfo { int next_signal_id { 0 }; }; -static AK::Singleton s_signals; +static Singleton s_signals; template inline SignalHandlersInfo* signals_info() { diff --git a/Userland/Libraries/LibTLS/Certificate.h b/Userland/Libraries/LibTLS/Certificate.h index 2810b3ac4f0..e1694c72a35 100644 --- a/Userland/Libraries/LibTLS/Certificate.h +++ b/Userland/Libraries/LibTLS/Certificate.h @@ -67,7 +67,7 @@ public: static DefaultRootCACertificates& the() { return s_the; } private: - static AK::Singleton s_the; + static Singleton s_the; Vector m_ca_certificates; }; diff --git a/Userland/Libraries/LibTLS/TLSv12.cpp b/Userland/Libraries/LibTLS/TLSv12.cpp index eb28a890d45..ff372f308f5 100644 --- a/Userland/Libraries/LibTLS/TLSv12.cpp +++ b/Userland/Libraries/LibTLS/TLSv12.cpp @@ -344,7 +344,7 @@ bool TLSv12::add_client_key(ReadonlyBytes certificate_pem_buffer, ReadonlyBytes return add_client_key(certificate); } -AK::Singleton DefaultRootCACertificates::s_the; +Singleton DefaultRootCACertificates::s_the; DefaultRootCACertificates::DefaultRootCACertificates() { // FIXME: This might not be the best format, find a better way to represent CA certificates.