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

Revert "Kernel: Switch singletons to use new Singleton class"

This reverts commit f48feae0b2.
This commit is contained in:
Andreas Kling 2020-08-22 17:53:34 +02:00
parent 0addcb45b8
commit 2fd9e72264
44 changed files with 146 additions and 184 deletions

View file

@ -25,7 +25,6 @@
*/
#include <AK/StringBuilder.h>
#include <Kernel/Singleton.h>
#include <Kernel/FileSystem/FileDescription.h>
#include <Kernel/Net/ARP.h>
#include <Kernel/Net/ICMP.h>
@ -46,10 +45,11 @@
namespace Kernel {
static auto s_table = make_singleton<Lockable<HashTable<IPv4Socket*>>>();
Lockable<HashTable<IPv4Socket*>>& IPv4Socket::all_sockets()
{
static Lockable<HashTable<IPv4Socket*>>* s_table;
if (!s_table)
s_table = new Lockable<HashTable<IPv4Socket*>>;
return *s_table;
}