VirtualBox

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


Ignore:
Timestamp:
Dec 6, 2013 9:38:28 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
91156
Message:

Devices/USB: First part of the rework, move most of the work to dedicated threads to improve performance

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/RemoteUSBBackend.cpp

    r48955 r49814  
    116116    bool              fFailed;         /* True if an operation has failed for the device. */
    117117    RTCRITSECT        critsect;        /* Protects the queued urb list. */
     118    volatile bool     fWokenUp;        /* Flag whther the reaper was woken up. */
    118119} REMOTEUSBDEVICE;
    119120
     
    277278            /* Initialize the device structure. */
    278279            pDevice->pOwner = pThis;
     280            pDevice->fWokenUp = false;
    279281
    280282            rc = RTCritSectInit(&pDevice->critsect);
     
    691693        uint32_t u32ClientId;
    692694
     695        if (ASMAtomicXchgBool(&pDevice->fWokenUp, false))
     696            break;
     697
    693698        /* Scan queued URBs, look for completed. */
    694699        requestDevice (pDevice);
     
    782787
    783788    return rc;
     789}
     790
     791static DECLCALLBACK(int) iface_Wakeup (PREMOTEUSBDEVICE pDevice)
     792{
     793    ASMAtomicXchgBool(&pDevice->fWokenUp, true);
     794    return VINF_SUCCESS;
    784795}
    785796
     
    977988    mCallback.pfnClearHaltedEP    = iface_ClearHaltedEP;
    978989    mCallback.pfnCancelURB        = iface_CancelURB;
     990    mCallback.pfnWakeup           = iface_Wakeup;
    979991}
    980992
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