mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1050445 - Part 2: Add ClearAcquisitionState. r=froydnj
--HG-- extra : rebase_source : 0900c1663a9b06bbc68d757f20182513ceb4c35e
This commit is contained in:
parent
eb0cc8edce
commit
525c4f41a3
@ -343,7 +343,7 @@ ReentrantMonitor::Wait(PRIntervalTime aInterval)
|
||||
AcquisitionState savedAcquisitionState = GetAcquisitionState();
|
||||
BlockingResourceBase* savedChainPrev = mChainPrev;
|
||||
mEntryCount = 0;
|
||||
SetAcquisitionState(false);
|
||||
ClearAcquisitionState();
|
||||
mChainPrev = 0;
|
||||
|
||||
nsresult rv;
|
||||
@ -379,7 +379,7 @@ CondVar::Wait(PRIntervalTime aInterval)
|
||||
// save mutex state and reset to empty
|
||||
AcquisitionState savedAcquisitionState = mLock->GetAcquisitionState();
|
||||
BlockingResourceBase* savedChainPrev = mLock->mChainPrev;
|
||||
mLock->SetAcquisitionState(false);
|
||||
mLock->ClearAcquisitionState();
|
||||
mLock->mChainPrev = 0;
|
||||
|
||||
// give up mutex until we're back from Wait()
|
||||
|
@ -202,6 +202,17 @@ protected:
|
||||
mAcquired = aAcquisitionState;
|
||||
}
|
||||
|
||||
/**
|
||||
* ClearAcquisitionState
|
||||
* Indicate this resource is not acquired.
|
||||
*
|
||||
* *NOT* thread safe. Requires ownership of underlying resource.
|
||||
*/
|
||||
void ClearAcquisitionState()
|
||||
{
|
||||
mAcquired = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* mChainPrev
|
||||
* A series of resource acquisitions creates a chain of orders. This
|
||||
|
Loading…
Reference in New Issue
Block a user