summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCore/EventLoop.cpp
diff options
context:
space:
mode:
authorDaniel Bertalan <dani@danielbertalan.dev>2021-06-24 10:28:36 +0200
committerAli Mohammad Pur <Ali.mpfard@gmail.com>2021-06-24 17:35:49 +0430
commit2d2747cb15a369e2c80c4039e56cd21b6fae510c (patch)
tree2cfda4f821c0e2880a358dee3f7ddb1d5bb16a30 /Userland/Libraries/LibCore/EventLoop.cpp
parente3648454565ec984c4fa2222a5e11c512c8902d3 (diff)
downloadserenity-2d2747cb15a369e2c80c4039e56cd21b6fae510c.zip
LibCore+AK: Use proper atomics in `Singleton`
Diffstat (limited to 'Userland/Libraries/LibCore/EventLoop.cpp')
-rw-r--r--Userland/Libraries/LibCore/EventLoop.cpp4
1 files changed, 2 insertions, 2 deletions
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<SignalHandlersInfo> s_signals;
template<bool create_if_null = true>
inline SignalHandlersInfo* signals_info()
{
- static SignalHandlersInfo* s_signals;
- return AK::Singleton<SignalHandlersInfo>::get(s_signals);
+ return s_signals.ptr();
}
pid_t EventLoop::s_pid;