Commit e4431011 authored by Andrew Gallagher's avatar Andrew Gallagher Committed by Facebook Github Bot

Move inline functions with static-locals to implementation files

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
parent e0cb729e
......@@ -49,4 +49,10 @@ bool RCURegisterThread() {
return ret;
}
RCUReadLock& RCUReadLock::instance() {
// Both lock and unlock are static, so no need to worry about destruction
// order
static RCUReadLock instance;
return instance;
}
}
......@@ -30,12 +30,7 @@ bool RCURegisterThread();
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);
......
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