Summary:
This refactors inline functions defined in headers which had static locals
so that their definition is moved to the corresponding implementation file.
Reviewed By: yfeldblum
Differential Revision:
D4049175
fbshipit-source-id:
56eeb82eb23b04c3b9940d803d05050949aa5ef9
return ret;
}
+RCUReadLock& RCUReadLock::instance() {
+ // Both lock and unlock are static, so no need to worry about destruction
+ // order
+ static RCUReadLock instance;
+ return instance;
+}
}
class RCUReadLock {
public:
- static RCUReadLock& instance() {
- // Both lock and unlock are static, so no need to worry about destruction
- // order
- static RCUReadLock instance;
- return instance;
- }
+ static RCUReadLock& instance();
static void lock() {
assert(RCURegisterThread() == false);