VirtualBox

Changeset 25906 in vbox


Ignore:
Timestamp:
Jan 18, 2010 6:33:04 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
56722
Message:

Main: remove the evil Auto*Lock*::maybeEnter() function which is no longer used by the media task code now

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/com/AutoLock.h

    r25885 r25906  
    397397 *
    398398 * In addition to utility methods for subclasses, this implements the public
    399  * leave/enter/maybeEnter methods, which are common to all
     399 * leave/enter methods, which are common to all
    400400 * write locks.
    401401 */
     
    426426    void leave();
    427427    void enter();
    428     void maybeEnter();
    429428};
    430429
  • trunk/src/VBox/Main/glue/AutoLock.cpp

    r25890 r25906  
    624624}
    625625
    626 /**
    627  * Same as #enter() but checks if the current thread actally owns the lock
    628  * and only proceeds if not. As a result, as opposed to #enter(), doesn't
    629  * assert when called with the lock already being held.
    630  */
    631 void AutoWriteLockBase::maybeEnter()
    632 {
    633     uint32_t i = 0;
    634     for (HandlesVector::iterator it = m->aHandles.begin();
    635          it != m->aHandles.end();
    636          ++it)
    637     {
    638         LockHandle *pHandle = *it;
    639         if (pHandle)
    640         {
    641             if (!pHandle->isWriteLockOnCurrentThread())
    642             {
    643                 for (; m->acUnlockedInLeave[i]; --m->acUnlockedInLeave[i])
    644                     callLockImpl(*pHandle);
    645             }
    646         }
    647         ++i;
    648     }
    649 }
    650 
    651626////////////////////////////////////////////////////////////////////////////////
    652627//
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette