VirtualBox

Ignore:
Timestamp:
May 7, 2008 6:27:19 PM (17 years ago)
Author:
vboxsync
Message:

Assert on no-lock assumptions in onUSBDeviceAttach and onUSBDeviceDetach.

File:
1 edited

Legend:

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

    r8666 r8680  
    86898689
    86908690/**
    8691  *  @note Locks this object for reading.
     8691 *  @note The calls shall hold no locks. Will temporarily lock this object for reading.
    86928692 */
    86938693HRESULT SessionMachine::onUSBDeviceAttach (IUSBDevice *aDevice,
     
    87148714        return E_FAIL;
    87158715
     8716    /* No locks should be held at this point. */
     8717    AssertMsg (RTThreadGetWriteLockCount (RTThreadSelf()) == 0, ("%d\n", RTThreadGetWriteLockCount (RTThreadSelf())));
     8718    AssertMsg (RTThreadGetReadLockCount (RTThreadSelf()) == 0, ("%d\n", RTThreadGetReadLockCount (RTThreadSelf())));
     8719
    87168720    return directControl->OnUSBDeviceAttach (aDevice, aError, aMaskedIfs);
    87178721}
    87188722
    87198723/**
    8720  *  @note Locks this object for reading.
     8724 *  @note The calls shall hold no locks. Will temporarily lock this object for reading.
    87218725 */
    87228726HRESULT SessionMachine::onUSBDeviceDetach (INPTR GUIDPARAM aId,
     
    87418745    if (!directControl)
    87428746        return E_FAIL;
     8747
     8748    /* No locks should be held at this point. */
     8749    AssertMsg (RTThreadGetWriteLockCount (RTThreadSelf()) == 0, ("%d\n", RTThreadGetWriteLockCount (RTThreadSelf())));
     8750    AssertMsg (RTThreadGetReadLockCount (RTThreadSelf()) == 0, ("%d\n", RTThreadGetReadLockCount (RTThreadSelf())));
    87438751
    87448752    return directControl->OnUSBDeviceDetach (aId, aError);
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