mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:28:10 +00:00
Revert "Kernel: Switch singletons to use new Singleton class"
This reverts commit f48feae0b2
.
This commit is contained in:
parent
0addcb45b8
commit
2fd9e72264
44 changed files with 146 additions and 184 deletions
|
@ -31,7 +31,6 @@
|
|||
#include <Kernel/Net/UDPSocket.h>
|
||||
#include <Kernel/Process.h>
|
||||
#include <Kernel/Random.h>
|
||||
#include <Kernel/Singleton.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
|
@ -42,10 +41,11 @@ void UDPSocket::for_each(Function<void(const UDPSocket&)> callback)
|
|||
callback(*it.value);
|
||||
}
|
||||
|
||||
static auto s_map = make_singleton<Lockable<HashMap<u16, UDPSocket*>>>();
|
||||
|
||||
Lockable<HashMap<u16, UDPSocket*>>& UDPSocket::sockets_by_port()
|
||||
{
|
||||
static Lockable<HashMap<u16, UDPSocket*>>* s_map;
|
||||
if (!s_map)
|
||||
s_map = new Lockable<HashMap<u16, UDPSocket*>>;
|
||||
return *s_map;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue