Commit c2207f72 authored by Dan Melnic's avatar Dan Melnic Committed by Facebook Github Bot

Handle the dlopen static initialization

Summary: Handle the dlopen static initialization

Reviewed By: yfeldblum

Differential Revision: D9847032

fbshipit-source-id: 089628ef88cf72d189a8904a3f2231f1affc764c
parent 66e48fe3
......@@ -15,9 +15,12 @@
*/
#include <folly/synchronization/Rcu.h>
#include <folly/detail/StaticSingletonManager.h>
namespace folly {
FOLLY_STATIC_CTOR_PRIORITY_MAX folly::Indestructible<rcu_domain<RcuTag>>
rcu_default_domain_;
FOLLY_STATIC_CTOR_PRIORITY_MAX folly::Indestructible<rcu_domain<RcuTag>*>
rcu_default_domain_(
folly::detail::createGlobal<rcu_domain<RcuTag>, RcuTag>());
} // namespace folly
......@@ -380,10 +380,10 @@ class rcu_domain {
void half_sync(bool blocking, list_head& cbs);
};
extern folly::Indestructible<rcu_domain<RcuTag>> rcu_default_domain_;
extern folly::Indestructible<rcu_domain<RcuTag>*> rcu_default_domain_;
inline rcu_domain<RcuTag>* rcu_default_domain() {
return &(*rcu_default_domain_);
return *rcu_default_domain_;
}
// Main reader guard class.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment