aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp')
-rw-r--r--lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp b/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
index ebd2438..55177f7 100644
--- a/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
+++ b/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
@@ -56,16 +56,14 @@ ProcessFreeBSD::CreateInstance(Target& target,
void
ProcessFreeBSD::Initialize()
{
- static bool g_initialized = false;
+ static std::once_flag g_once_flag;
- if (!g_initialized)
- {
+ std::call_once(g_once_flag, []() {
PluginManager::RegisterPlugin(GetPluginNameStatic(),
GetPluginDescriptionStatic(),
CreateInstance);
ProcessPOSIXLog::Initialize(GetPluginNameStatic());
- g_initialized = true;
- }
+ });
}
lldb_private::ConstString