VirtualBox

Changeset 3127 in vbox


Ignore:
Timestamp:
Jun 15, 2007 5:48:21 PM (17 years ago)
Author:
vboxsync
Message:

Main: Fixed: Avoid IPC dead-locks when calling Console::captureUSBDevices() and Console::releaseAllUSBDevices().

File:
1 edited

Legend:

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

    r3113 r3127  
    62566256    if (VBOX_SUCCESS (vrc))
    62576257    {
     6258        /* leave the lock before calling Host in VBoxSVC since Host may call
     6259         * us back from under its lock (e.g. onUSBDeviceAttach()) which would
     6260         * produce an inter-process dead-lock otherwise. */
     6261        AutoLock alock (this);
     6262        alock.leave();
     6263
    62586264        HRESULT hrc = mControl->AutoCaptureUSBDevices();
    62596265        ComAssertComRCRetRC (hrc);
     
    62826288    AssertReturnVoid (isLockedOnCurrentThread());
    62836289
     6290    mUSBDevices.clear();
     6291
     6292    /* leave the lock before calling Host in VBoxSVC since Host may call
     6293     * us back from under its lock (e.g. onUSBDeviceAttach()) which would
     6294     * produce an inter-process dead-lock otherwise. */
     6295    AutoLock alock (this);
     6296    alock.leave();
     6297
    62846298    mControl->ReleaseAllUSBDevices();
    6285     mUSBDevices.clear();
    62866299}
    62876300
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