From bbf28648de0d8695c502e13922a8d9e5ca1b51e8 Mon Sep 17 00:00:00 2001 From: Billy Donahue Date: Wed, 9 Jan 2019 17:32:12 -0500 Subject: SERVER-30711: scope_guard rewrite, to avoid -Werror=noexcept-type Macro ON_BLOCK_EXIT(...) now takes a single callable, Some renames: Dismias -> dismiss MakeGuard => makeGuard --- src/mongo/db/concurrency/lock_state.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mongo/db/concurrency/lock_state.cpp') diff --git a/src/mongo/db/concurrency/lock_state.cpp b/src/mongo/db/concurrency/lock_state.cpp index 8ffbee8c523..11a4028e7fb 100644 --- a/src/mongo/db/concurrency/lock_state.cpp +++ b/src/mongo/db/concurrency/lock_state.cpp @@ -335,7 +335,7 @@ LockResult LockerImpl::_acquireTicket(OperationContext* opCtx, LockMode mode, Da } // If the ticket wait is interrupted, restore the state of the client. - auto restoreStateOnErrorGuard = MakeGuard([&] { _clientState.store(kInactive); }); + auto restoreStateOnErrorGuard = makeGuard([&] { _clientState.store(kInactive); }); OperationContext* interruptible = _uninterruptibleLocksRequested ? nullptr : opCtx; if (deadline == Date_t::max()) { @@ -343,7 +343,7 @@ LockResult LockerImpl::_acquireTicket(OperationContext* opCtx, LockMode mode, Da } else if (!holder->waitForTicketUntil(interruptible, deadline)) { return LOCK_TIMEOUT; } - restoreStateOnErrorGuard.Dismiss(); + restoreStateOnErrorGuard.dismiss(); } _clientState.store(reader ? kActiveReader : kActiveWriter); return LOCK_OK; @@ -835,7 +835,7 @@ LockResult LockerImpl::lockComplete(OperationContext* opCtx, uint64_t startOfCurrentWaitTime = startOfTotalWaitTime; // Clean up the state on any failed lock attempts. - auto unlockOnErrorGuard = MakeGuard([&] { + auto unlockOnErrorGuard = makeGuard([&] { LockRequestsMap::Iterator it = _requests.find(resId); _unlockImpl(&it); }); @@ -892,7 +892,7 @@ LockResult LockerImpl::lockComplete(OperationContext* opCtx, // lock was still granted after all, but we don't try to take advantage of that and will return // a timeout. if (result == LOCK_OK) { - unlockOnErrorGuard.Dismiss(); + unlockOnErrorGuard.dismiss(); } return result; } -- cgit v1.2.1