VirtualBox

Changeset 46717 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Jun 21, 2013 8:34:43 AM (12 years ago)
Author:
vboxsync
Message:

Main/glue/EventQueue: fix attempt, not fully verified

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/glue/EventQueue.cpp

    r46652 r46717  
    9191    {
    9292        fWait = mEvents.size() == 0;
    93         if (!fWait)
     93        if (fWait)
    9494        {
    9595            int rc2 = RTCritSectLeave(&mCritSect);
     
    9898    }
    9999    else
    100         fWait = false;
    101 
    102     if (fWait)
    103100    {
    104101        int rc2 = RTCritSectLeave(&mCritSect);
    105102        AssertRC(rc2);
    106 
     103        fWait = false;
     104    }
     105
     106    if (fWait)
     107    {
    107108        rc = RTSemEventWaitNoResume(mSemEvent, cMsTimeout);
     109        if (RT_SUCCESS(rc))
     110            rc = RTCritSectEnter(&mCritSect);
    108111    }
    109112
     
    113116            return VERR_INTERRUPTED;
    114117
    115         if (fWait)
    116             rc = RTCritSectEnter(&mCritSect);
    117118        if (RT_SUCCESS(rc))
    118119        {
Note: See TracChangeset for help on using the changeset viewer.

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