From 2d2747cb15a369e2c80c4039e56cd21b6fae510c Mon Sep 17 00:00:00 2001 From: Daniel Bertalan Date: Thu, 24 Jun 2021 10:28:36 +0200 Subject: LibCore+AK: Use proper atomics in `Singleton` --- Userland/Libraries/LibCore/EventLoop.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Userland/Libraries') diff --git a/Userland/Libraries/LibCore/EventLoop.cpp b/Userland/Libraries/LibCore/EventLoop.cpp index c9c4b78b27..87e04188e8 100644 --- a/Userland/Libraries/LibCore/EventLoop.cpp +++ b/Userland/Libraries/LibCore/EventLoop.cpp @@ -112,11 +112,11 @@ struct SignalHandlersInfo { int next_signal_id { 0 }; }; +static AK::Singleton s_signals; template inline SignalHandlersInfo* signals_info() { - static SignalHandlersInfo* s_signals; - return AK::Singleton::get(s_signals); + return s_signals.ptr(); } pid_t EventLoop::s_pid; -- cgit v1.2.3