mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:27:35 +00:00
Revert "AK: Get rid of make_singleton function"
This reverts commit 5a98e329d1
.
This commit is contained in:
parent
8a21491d86
commit
68580d5a8d
31 changed files with 46 additions and 42 deletions
|
@ -46,7 +46,7 @@
|
|||
|
||||
namespace Kernel {
|
||||
|
||||
static AK::Singleton<Lockable<HashTable<IPv4Socket*>>> s_table;
|
||||
static auto s_table = AK::make_singleton<Lockable<HashTable<IPv4Socket*>>>();
|
||||
|
||||
Lockable<HashTable<IPv4Socket*>>& IPv4Socket::all_sockets()
|
||||
{
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
namespace Kernel {
|
||||
|
||||
static AK::Singleton<Lockable<InlineLinkedList<LocalSocket>>> s_list;
|
||||
static auto s_list = AK::make_singleton<Lockable<InlineLinkedList<LocalSocket>>>();
|
||||
|
||||
Lockable<InlineLinkedList<LocalSocket>>& LocalSocket::all_sockets()
|
||||
{
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
namespace Kernel {
|
||||
|
||||
static AK::Singleton<LoopbackAdapter> s_loopback;
|
||||
static auto s_loopback = AK::make_singleton<LoopbackAdapter>();
|
||||
|
||||
LoopbackAdapter& LoopbackAdapter::the()
|
||||
{
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
namespace Kernel {
|
||||
|
||||
static AK::Singleton<Lockable<HashTable<NetworkAdapter*>>> s_table;
|
||||
static auto s_table = AK::make_singleton<Lockable<HashTable<NetworkAdapter*>>>();
|
||||
|
||||
static Lockable<HashTable<NetworkAdapter*>>& all_adapters()
|
||||
{
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
namespace Kernel {
|
||||
|
||||
static AK::Singleton<Lockable<HashMap<IPv4Address, MACAddress>>> s_arp_table;
|
||||
static auto s_arp_table = AK::make_singleton<Lockable<HashMap<IPv4Address, MACAddress>>>();
|
||||
|
||||
Lockable<HashMap<IPv4Address, MACAddress>>& arp_table()
|
||||
{
|
||||
|
|
|
@ -63,14 +63,14 @@ void TCPSocket::set_state(State new_state)
|
|||
}
|
||||
}
|
||||
|
||||
static AK::Singleton<Lockable<HashMap<IPv4SocketTuple, RefPtr<TCPSocket>>>> s_socket_closing;
|
||||
static auto s_socket_closing = AK::make_singleton<Lockable<HashMap<IPv4SocketTuple, RefPtr<TCPSocket>>>>();
|
||||
|
||||
Lockable<HashMap<IPv4SocketTuple, RefPtr<TCPSocket>>>& TCPSocket::closing_sockets()
|
||||
{
|
||||
return *s_socket_closing;
|
||||
}
|
||||
|
||||
static AK::Singleton<Lockable<HashMap<IPv4SocketTuple, TCPSocket*>>> s_socket_tuples;
|
||||
static auto s_socket_tuples = AK::make_singleton<Lockable<HashMap<IPv4SocketTuple, TCPSocket*>>>();
|
||||
|
||||
Lockable<HashMap<IPv4SocketTuple, TCPSocket*>>& TCPSocket::sockets_by_tuple()
|
||||
{
|
||||
|
|
|
@ -42,7 +42,7 @@ void UDPSocket::for_each(Function<void(const UDPSocket&)> callback)
|
|||
callback(*it.value);
|
||||
}
|
||||
|
||||
static AK::Singleton<Lockable<HashMap<u16, UDPSocket*>>> s_map;
|
||||
static auto s_map = AK::make_singleton<Lockable<HashMap<u16, UDPSocket*>>>();
|
||||
|
||||
Lockable<HashMap<u16, UDPSocket*>>& UDPSocket::sockets_by_port()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue