Logo Search packages:      
Sourcecode: virtualbox-ose version File versions  Download package

void util::AutoWriteLockBase::enter (  ) 

Causes the current thread to restore the write lock level after the leave() call. This call will indefinitely block if another thread has successfully acquired a write or a read lock on the same semaphore in between.

Definition at line 609 of file AutoLock.cpp.

References AssertMsg, and callLockImpl().

Referenced by VirtualBoxBase::addCaller(), Medium::LockRead(), Medium::LockWrite(), Medium::queryInfo(), SessionMachine::restoreSnapshotHandler(), Progress::WaitForCompletion(), CombinedProgress::WaitForCompletion(), CombinedProgress::WaitForOperationCompletion(), and Progress::WaitForOperationCompletion().

    AssertMsg(m->fIsLocked, ("m->fIsLocked is false, cannot enter()!"));

    uint32_t i = 0;
    for (HandlesVector::iterator it = m->aHandles.begin();
         it != m->aHandles.end();
        LockHandle *pHandle = *it;
        if (pHandle)
            AssertMsg(m->acUnlockedInLeave[i] != 0, ("m->cUnlockedInLeave[%d] is 0! enter() without leave()?", i));

            for (; m->acUnlockedInLeave[i]; --m->acUnlockedInLeave[i])

Generated by  Doxygen 1.6.0   Back to index