summaryrefslogtreecommitdiff
path: root/src/mongo/util
diff options
context:
space:
mode:
authorSiyuan Zhou <siyuan.zhou@mongodb.com>2018-08-16 18:52:36 -0400
committerSiyuan Zhou <siyuan.zhou@mongodb.com>2018-08-16 18:52:36 -0400
commit57be1f7097ceed41b156a826c541aa276f35dd61 (patch)
treebbcc3cfcc5371ffdca3e6bda617385cc54a2bc0d /src/mongo/util
parent0b16d855c1f1ceb910fbc87cbff0317b33710b6d (diff)
downloadmongo-57be1f7097ceed41b156a826c541aa276f35dd61.tar.gz
Revert "SERVER-36676 spinlock as mutex in dbg builds linux"
This reverts commit db1535d7e9094fd444609ade9bf0fb725d611f85.
Diffstat (limited to 'src/mongo/util')
-rw-r--r--src/mongo/util/concurrency/spin_lock.h25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/mongo/util/concurrency/spin_lock.h b/src/mongo/util/concurrency/spin_lock.h
index 591c059ed85..9e4b707f160 100644
--- a/src/mongo/util/concurrency/spin_lock.h
+++ b/src/mongo/util/concurrency/spin_lock.h
@@ -37,7 +37,6 @@
#endif
#include "mongo/base/disallow_copying.h"
-#include "mongo/config.h"
#include "mongo/platform/compiler.h"
#include "mongo/stdx/mutex.h"
@@ -70,27 +69,6 @@ private:
#else
-#if MONGO_CONFIG_DEBUG_BUILD
-class SpinLock {
- MONGO_DISALLOW_COPYING(SpinLock);
-
-public:
- SpinLock() = default;
-
- void lock() {
- _mutex.lock();
- }
-
- void unlock() {
- _mutex.unlock();
- }
-
-private:
- stdx::mutex _mutex;
-};
-
-#else
-
class SpinLock {
MONGO_DISALLOW_COPYING(SpinLock);
@@ -118,9 +96,6 @@ private:
// Initializes to the cleared state.
std::atomic_flag _locked = ATOMIC_FLAG_INIT; // NOLINT
};
-
-#endif
-
#endif
using scoped_spinlock = stdx::lock_guard<SpinLock>;