VirtualBox

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DevSB16.cpp

    r87760 r87767  
    300300 * @callback_method_impl{PFNTMTIMERDEV}
    301301 */
    302 static DECLCALLBACK(void) sb16TimerIRQ(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
     302static DECLCALLBACK(void) sb16TimerIRQ(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, void *pvUser)
    303303{
    304304    PSB16STATE pThis = PDMDEVINS_2_DATA(pDevIns, PSB16STATE);
    305     RT_NOREF(pvUser, pTimer);
     305    RT_NOREF(pvUser, hTimer);
    306306
    307307    pThis->can_write = 1;
     
    16891689 * @callback_method_impl{FNTMTIMERDEV}
    16901690 */
    1691 static DECLCALLBACK(void) sb16TimerIO(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)
     1691static DECLCALLBACK(void) sb16TimerIO(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, void *pvUser)
    16921692{
    16931693    PSB16STATE pThis = PDMDEVINS_2_DATA(pDevIns, PSB16STATE);
    1694     RT_NOREF(pTimer, pvUser);
    1695 
    1696     uint64_t cTicksNow     = PDMDevHlpTimerGet(pDevIns, pThis->hTimerIO);
     1694    Assert(hTimer == pThis->hTimerIO); RT_NOREF(pvUser);
     1695
     1696    uint64_t cTicksNow     = PDMDevHlpTimerGet(pDevIns, hTimer);
    16971697    bool     fIsPlaying    = false; /* Whether one or more streams are still playing. */
    16981698    bool     fDoTransfer   = false;
     
    17491749        uint64_t cTicks = pThis->cTicksTimerIOInterval;
    17501750        /** @todo adjust cTicks down by now much cbOutMin represents. */
    1751         PDMDevHlpTimerSet(pDevIns, pThis->hTimerIO, cTicksNow + cTicks);
     1751        PDMDevHlpTimerSet(pDevIns, hTimer, cTicksNow + cTicks);
    17521752    }
    17531753}
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