Move threadlocal_detail::Atfork to its own file
[folly.git] / folly / Singleton.cpp
index 07ec2666bad7cee294f5c097f9bc80b2289e6546..7114d53de9df1ca16c630913636a4dc6436e1ddf 100644 (file)
@@ -38,11 +38,11 @@ namespace folly {
 SingletonVault::Type SingletonVault::defaultVaultType() {
 #if !defined(_WIN32) && !defined(__APPLE__) && !defined(__ANDROID__)
   bool isPython = dlsym(RTLD_DEFAULT, "Py_Main");
-  bool isHaskell = &::hs_init_weak || dlsym(RTLD_DEFAULT, "hs_init");
+  bool isHaskel = &::hs_init_weak || dlsym(RTLD_DEFAULT, "hs_init");
   bool isJVM = dlsym(RTLD_DEFAULT, "JNI_GetCreatedJavaVMs");
   bool isD = dlsym(RTLD_DEFAULT, "_d_run_main");
 
-  return (isPython || isHaskell || isJVM || isD) ? Type::Relaxed : Type::Strict;
+  return isPython || isHaskel || isJVM || isD ? Type::Relaxed : Type::Strict;
 #else
   return Type::Relaxed;
 #endif
@@ -60,7 +60,7 @@ namespace detail {
             << type.name() << ">\n";
   std::abort();
 }
-}
+} // namespace detail
 
 namespace {
 
@@ -88,7 +88,7 @@ FatalHelper fatalHelper;
 FatalHelper __attribute__ ((__init_priority__ (101))) fatalHelper;
 #endif
 
-}
+} // namespace
 
 SingletonVault::~SingletonVault() { destroyInstances(); }
 
@@ -266,4 +266,4 @@ void SingletonVault::scheduleDestroyInstances() {
   static SingletonVaultDestructor singletonVaultDestructor;
 }
 
-}
+} // namespace folly