VirtualBox

Changeset 16586 in vbox for trunk


Ignore:
Timestamp:
Feb 9, 2009 1:38:57 PM (16 years ago)
Author:
vboxsync
Message:

Main: releaseCaller(): handle AutoMayUninitSpan case.

File:
1 edited

Legend:

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

    r16560 r16586  
    261261        if (mStateChangeThread == RTThreadSelf())
    262262        {
    263             /* Called from the same thread that is doing AutoInitSpan or
    264              * AutoUninitSpan, just succeed */
     263            /* Called from the same thread that is doing AutoInitSpan,
     264             * AutoMayUninitSpan or AutoUninitSpan: just succeed */
    265265            return;
    266266        }
    267267
    268         if (mState == InUninit)
     268        if (mState == MayUninit || mState == InUninit)
    269269        {
    270             /* the caller is being released after AutoUninitSpan has begun */
     270            /* the caller is being released after AutoUninitSpan or
     271             * AutoMayUninitSpan has begun */
    271272            AssertMsgReturn (mCallers != 0, ("mCallers is ZERO!"), (void) 0);
    272273            -- mCallers;
     
    274275            if (mCallers == 0)
    275276            {
    276                 /* inform the AutoUninitSpan ctor there are no more callers */
     277                /* inform the Auto*UninitSpan ctor there are no more callers */
    277278                RTSemEventSignal (mZeroCallersSem);
    278279            }
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