diff options
author | Ben Caimano <ben.caimano@mongodb.com> | 2019-11-01 17:24:53 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-11-01 17:24:53 +0000 |
commit | bf5bef47a8e6937b4e0d2c9df3fde3470bdc72c9 (patch) | |
tree | 8f71a9f272082dd9ee0e471ef5fcb9f19519600d /src/mongo/db/storage/mobile/mobile_record_store.cpp | |
parent | f210bc645453c05979067c556bf6f2bd43e64134 (diff) | |
download | mongo-bf5bef47a8e6937b4e0d2c9df3fde3470bdc72c9.tar.gz |
SERVER-42165 Replace uses of stdx::mutex with mongo::Mutex
Diffstat (limited to 'src/mongo/db/storage/mobile/mobile_record_store.cpp')
-rw-r--r-- | src/mongo/db/storage/mobile/mobile_record_store.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mongo/db/storage/mobile/mobile_record_store.cpp b/src/mongo/db/storage/mobile/mobile_record_store.cpp index a28d26dcb3d..67deb71f1aa 100644 --- a/src/mongo/db/storage/mobile/mobile_record_store.cpp +++ b/src/mongo/db/storage/mobile/mobile_record_store.cpp @@ -233,7 +233,7 @@ void MobileRecordStore::_initDataSizeIfNeeded_inlock(OperationContext* opCtx) co } long long MobileRecordStore::dataSize(OperationContext* opCtx) const { - stdx::lock_guard<stdx::mutex> lock(_dataSizeMutex); + stdx::lock_guard<Latch> lock(_dataSizeMutex); _initDataSizeIfNeeded_inlock(opCtx); return _dataSize; } @@ -255,7 +255,7 @@ void MobileRecordStore::_initNumRecsIfNeeded_inlock(OperationContext* opCtx) con } long long MobileRecordStore::numRecords(OperationContext* opCtx) const { - stdx::lock_guard<stdx::mutex> lock(_numRecsMutex); + stdx::lock_guard<Latch> lock(_numRecsMutex); _initNumRecsIfNeeded_inlock(opCtx); return _numRecs; } @@ -451,7 +451,7 @@ public: void commit(boost::optional<Timestamp>) override {} void rollback() override { - stdx::lock_guard<stdx::mutex> lock(_rs->_numRecsMutex); + stdx::lock_guard<Latch> lock(_rs->_numRecsMutex); _rs->_numRecs -= _diff; } @@ -461,7 +461,7 @@ private: }; void MobileRecordStore::_changeNumRecs(OperationContext* opCtx, int64_t diff) { - stdx::lock_guard<stdx::mutex> lock(_numRecsMutex); + stdx::lock_guard<Latch> lock(_numRecsMutex); opCtx->recoveryUnit()->registerChange(new NumRecsChange(this, diff)); _initNumRecsIfNeeded_inlock(opCtx); _numRecs += diff; @@ -472,7 +472,7 @@ bool MobileRecordStore::_resetNumRecsIfNeeded(OperationContext* opCtx, int64_t n int64_t currNumRecs = numRecords(opCtx); if (currNumRecs != newNumRecs) { wasReset = true; - stdx::lock_guard<stdx::mutex> lock(_numRecsMutex); + stdx::lock_guard<Latch> lock(_numRecsMutex); _numRecs = newNumRecs; } return wasReset; @@ -488,7 +488,7 @@ public: void commit(boost::optional<Timestamp>) override {} void rollback() override { - stdx::lock_guard<stdx::mutex> lock(_rs->_dataSizeMutex); + stdx::lock_guard<Latch> lock(_rs->_dataSizeMutex); _rs->_dataSize -= _diff; } @@ -498,7 +498,7 @@ private: }; void MobileRecordStore::_changeDataSize(OperationContext* opCtx, int64_t diff) { - stdx::lock_guard<stdx::mutex> lock(_dataSizeMutex); + stdx::lock_guard<Latch> lock(_dataSizeMutex); opCtx->recoveryUnit()->registerChange(new DataSizeChange(this, diff)); _initDataSizeIfNeeded_inlock(opCtx); _dataSize += diff; @@ -510,7 +510,7 @@ bool MobileRecordStore::_resetDataSizeIfNeeded(OperationContext* opCtx, int64_t if (currDataSize != _dataSize) { wasReset = true; - stdx::lock_guard<stdx::mutex> lock(_dataSizeMutex); + stdx::lock_guard<Latch> lock(_dataSizeMutex); _dataSize = newDataSize; } return wasReset; |