VirtualBox

Changeset 30706 in vbox


Ignore:
Timestamp:
Jul 7, 2010 1:51:37 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
63470
Message:

Main: simple locking

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/EventImpl.cpp

    r30702 r30706  
    771771
    772772    do {
    773         /* See comment in EventSource::GetEvent() */
    774         AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
     773        AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    775774
    776775        VBoxEventType_T evType;
     
    813812            if (FAILED_DEAD_INTERFACE(cbRc))
    814813            {
    815                 AutoWriteLock awlock(this COMMA_LOCKVAL_SRC_POS);
    816814                Listeners::iterator lit = m->mListeners.find(record.obj()->mListener);
    817815                if (lit != m->mListeners.end())
     
    842840    if (FAILED(autoCaller.rc())) return autoCaller.rc();
    843841
    844     /**
    845      * There's subtle dependency between this lock and one in FireEvent():
    846      * we need to be able to access event queue in FireEvent() while waiting
    847      * here, to make this wait preemptible, thus both take read lock (write
    848      * lock in FireEvent() would do too, and probably is a bit stricter),
    849      * but will be unable to .
    850      */
    851842    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    852843
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