VirtualBox

Ignore:
Timestamp:
Apr 23, 2010 7:57:16 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
60476
Message:

Guest Control: Update (no buffered host waiting anymore, fixed a couple of deadlocks and shutdown crashes).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/GuestControl/service.cpp

    r28557 r28625  
    531531    int rc = VINF_SUCCESS;
    532532
    533     HostCmd newCmd;
    534     rc = paramBufferAllocate(&newCmd.parmBuf, eFunction, cParms, paParms);
    535     if (RT_SUCCESS(rc))
    536     {
    537         mHostCmds.push_back(newCmd);
    538 
    539         /* Limit list size by deleting oldest element. */
    540         if (mHostCmds.size() > 256) /** @todo Use a define! */
    541             mHostCmds.pop_front();
    542     }
    543 
    544533    /* Some lazy guests to wake up which can process this command right now? */
    545534    if (!mGuestWaiters.empty())
    546535    {
    547         GuestCall curCall = mGuestWaiters.front();
    548         rc = notifyGuest(&curCall, eFunction, cParms, paParms);
    549         mGuestWaiters.pop_front();
    550     }
     536        HostCmd newCmd;
     537        rc = paramBufferAllocate(&newCmd.parmBuf, eFunction, cParms, paParms);
     538        if (RT_SUCCESS(rc))
     539        {
     540            mHostCmds.push_back(newCmd);
     541   
     542            /* Limit list size by deleting oldest element. */
     543            if (mHostCmds.size() > 256) /** @todo Use a define! */
     544                mHostCmds.pop_front();
     545
     546            GuestCall curCall = mGuestWaiters.front();
     547            rc = notifyGuest(&curCall, eFunction, cParms, paParms);
     548            mGuestWaiters.pop_front();
     549        }
     550    }
     551    else /* No guest waiting, don't bother ... */
     552        rc = VERR_TIMEOUT;
    551553    return rc;
    552554}
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