1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:28:11 +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

@ -29,6 +29,7 @@
#include <Kernel/FileSystem/VirtualFileSystem.h>
#include <Kernel/Net/LocalSocket.h>
#include <Kernel/Process.h>
#include <Kernel/Singleton.h>
#include <Kernel/StdLib.h>
#include <Kernel/UnixTypes.h>
#include <LibC/errno_numbers.h>
@ -37,11 +38,10 @@
namespace Kernel {
static auto s_list = make_singleton<Lockable<InlineLinkedList<LocalSocket>>>();
Lockable<InlineLinkedList<LocalSocket>>& LocalSocket::all_sockets()
{
static Lockable<InlineLinkedList<LocalSocket>>* s_list;
if (!s_list)
s_list = new Lockable<InlineLinkedList<LocalSocket>>();
return *s_list;
}