VirtualBox

Changeset 87767 in vbox for trunk/src/VBox/Devices/USB


Ignore:
Timestamp:
Feb 16, 2021 4:41:18 PM (4 years ago)
Author:
vboxsync
Message:

VMM/TM,Devices/*: Changed the device and usb timer callbacks to take a timer handle rather than a pointer. Try a little harder using it. bugref:9943

Location:
trunk/src/VBox/Devices/USB
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/USB/DevOHCI.cpp

    r87760 r87767  
    904904static int                  ohciR3InDoneQueueFind(POHCICC pThisCC, uint32_t GCPhysTD);
    905905# endif
    906 static DECLCALLBACK(void)   ohciR3LoadReattachDevices(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser);
    907906#endif /* IN_RING3 */
    908907RT_C_DECLS_END
     
    58045803
    58055804/**
     5805 * @callback_method_impl{FNTMTIMERDEV,
     5806 *      Reattaches devices after a saved state load.}
     5807 */
     5808static DECLCALLBACK(void) ohciR3LoadReattachDevices(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, void *pvUser)
     5809{
     5810    POHCICC      pThisCC = PDMDEVINS_2_DATA_CC(pDevIns, POHCICC);
     5811    POHCILOAD    pLoad   = pThisCC->pLoad;
     5812    LogFlow(("ohciR3LoadReattachDevices:\n"));
     5813    Assert(hTimer == pLoad->hTimer); RT_NOREF(pvUser);
     5814
     5815    /*
     5816     * Reattach devices.
     5817     */
     5818    for (unsigned i = 0; i < pLoad->cDevs; i++)
     5819        VUSBIRhAttachDevice(pThisCC->RootHub.pIRhConn, pLoad->apDevs[i]);
     5820
     5821    /*
     5822     * Cleanup.
     5823     */
     5824    PDMDevHlpTimerDestroy(pDevIns, hTimer);
     5825    pLoad->hTimer = NIL_TMTIMERHANDLE;
     5826    PDMDevHlpMMHeapFree(pDevIns, pLoad);
     5827    pThisCC->pLoad = NULL;
     5828}
     5829
     5830
     5831/**
    58065832 * Done state load operation.
    58075833 *
     
    58305856
    58315857    return VINF_SUCCESS;
    5832 }
    5833 
    5834 
    5835 /**
    5836  * @callback_method_impl{FNTMTIMERDEV,
    5837  *      Reattaches devices after a saved state load.}
    5838  */
    5839 static DECLCALLBACK(void) ohciR3LoadReattachDevices(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
    5840 {
    5841     POHCICC      pThisCC = PDMDEVINS_2_DATA_CC(pDevIns, POHCICC);
    5842     POHCILOAD    pLoad   = pThisCC->pLoad;
    5843     LogFlow(("ohciR3LoadReattachDevices:\n"));
    5844     RT_NOREF(pTimer, pvUser);
    5845 
    5846     /*
    5847      * Reattach devices.
    5848      */
    5849     for (unsigned i = 0; i < pLoad->cDevs; i++)
    5850         VUSBIRhAttachDevice(pThisCC->RootHub.pIRhConn, pLoad->apDevs[i]);
    5851 
    5852     /*
    5853      * Cleanup.
    5854      */
    5855     PDMDevHlpTimerDestroy(pDevIns, pLoad->hTimer);
    5856     pLoad->hTimer = NIL_TMTIMERHANDLE;
    5857     PDMDevHlpMMHeapFree(pDevIns, pLoad);
    5858     pThisCC->pLoad = NULL;
    58595858}
    58605859
  • trunk/src/VBox/Devices/USB/VUSBDevice.cpp

    r87762 r87767  
    13721372
    13731373/**
    1374  * Timer callback for doing reset completion.
    1375  *
    1376  * @param   pUsbIns     The USB device instance.
    1377  * @param   pTimer      The timer instance.
    1378  * @param   pvUser      The VUSB device data.
    1379  * @thread EMT
    1380  */
    1381 static DECLCALLBACK(void) vusbDevResetDoneTimer(PPDMUSBINS pUsbIns, PTMTIMER pTimer, void *pvUser)
    1382 {
    1383     RT_NOREF(pUsbIns, pTimer);
     1374 * @callback_method_impl{FNTMTIMERUSB,
     1375 *          Timer callback for doing reset completion.}
     1376 */
     1377static DECLCALLBACK(void) vusbDevResetDoneTimer(PPDMUSBINS pUsbIns, TMTIMERHANDLE hTimer, void *pvUser)
     1378{
    13841379    PVUSBDEV        pDev  = (PVUSBDEV)pvUser;
    13851380    PVUSBRESETARGS  pArgs = (PVUSBRESETARGS)pDev->pvArgs;
    13861381    Assert(pDev->pUsbIns == pUsbIns);
     1382    RT_NOREF(pUsbIns, hTimer);
    13871383
    13881384    AssertPtr(pArgs);
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