mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 14:58:46 +00:00
LibCore+AK: Use proper atomics in Singleton
This commit is contained in:
parent
e364845456
commit
2d2747cb15
Notes:
sideshowbarker
2024-07-18 11:34:27 +09:00
Author: https://github.com/BertalanD
Commit: 2d2747cb15
Pull-request: https://github.com/SerenityOS/serenity/pull/8150
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/alimpfard ✅
2 changed files with 9 additions and 10 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue