VirtualBox

Changeset 87820 in vbox for trunk/src/VBox/Devices/Input


Ignore:
Timestamp:
Feb 20, 2021 10:25:39 AM (4 years ago)
Author:
vboxsync
Message:

DevPS2M: The timer callbacks implicitly takes the device critical section before doing the callback.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Input/DevPS2M.cpp

    r87773 r87820  
    716716static uint32_t ps2mR3HaveEvents(PPS2M pThis)
    717717{
     718/** @todo r=bird: Why is this returning uint32_t when you're calculating a
     719 *        boolean value here?  Also, it's a predicate function... */
    718720    return   pThis->iAccumX || pThis->iAccumY || pThis->iAccumZ || pThis->iAccumW
    719721           || ((pThis->fCurrB | pThis->fAccumB) != pThis->fReportedB);
     
    729731    uint32_t    uHaveEvents;
    730732    Assert(hTimer == pThis->hThrottleTimer);
    731 
    732     /* Grab the lock to avoid races with PutEvent(). */
    733     int rc = PDMDevHlpCritSectEnter(pDevIns, pDevIns->pCritSectRoR3, VERR_SEM_BUSY);
    734     AssertReleaseRC(rc);
     733    Assert(PDMDevHlpCritSectIsOwner(pDevIns, pDevIns->pCritSectRoR3));
    735734
    736735    /* If more movement is accumulated, report it and restart the timer. */
     
    747746    else
    748747        pThis->fThrottleActive = false;
    749 
    750     PDMDevHlpCritSectLeave(pDevIns, pDevIns->pCritSectRoR3);
    751748}
    752749
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